A production-ready, modular web application stack for modern DevOps and Java development.
- Overview
- Features
- Architecture
- Project Structure
- Local Setup
- Usage
- Customization
- Contributing
- Contact
- License
Docker-Compose-Multiservice-App is a robust, scalable, and modular web application stack designed for rapid development and deployment. It leverages Docker Compose to orchestrate multiple essential services for enterprise-grade Java web applications.
- Modular Architecture: Each service runs in its own container for easy management and scaling.
- Data Persistence: Volumes ensure important data is retained across container restarts.
- Network Isolation: All services communicate over a dedicated Docker network.
- Production-Ready: Easily extend or customize for your needs.
- DevOps Focus: Built for CI/CD, automation, and modern infrastructure practices.
graph TD
User["User/Client"]
subgraph "Docker Compose Network"
Nginx["Nginx (Reverse Proxy)<br>Port: 8081"]
Tomcat["Tomcat (Java App)<br>Port: 8080"]
MySQL["MySQL DB<br>Port: 3306"]
RabbitMQ["RabbitMQ<br>Port: 15672"]
Memcached["Memcached<br>Port: 11211"]
end
User -- HTTP --> Nginx
Nginx -- Proxy --> Tomcat
Tomcat -- SQL --> MySQL
Tomcat -- MQ --> RabbitMQ
Tomcat -- Cache --> Memcached
.
├── app/ # Java web application files for Tomcat
├── db_data/ # MySQL data (persisted)
├── web/ # Static web content for Nginx
├── docker-compose.yml # Main Docker Compose configuration
├── nginx.conf # Nginx configuration
├── pom.xml # Java project config
└── ...
- Clone the repository:
git clone https://github.com/senopaul/Docker-Compose-Multiservice-App.git cd Docker-Compose-Multiservice-App - Start all services:
docker-compose up -d
- Access the services:
- MySQL:
localhost:3306(user:myuser, password:mypassword) - RabbitMQ UI: http://localhost:15672 (user:
myuser, password:mypassword) - Tomcat: http://localhost:8080
- Nginx: http://localhost:8081
- MySQL:
- Add Java webapps to
app/webapps/for Tomcat deployment. - Place static HTML files in
web/html/for Nginx. - Modify environment variables in
docker-compose.ymlas needed.
- Extend the stack with additional services as needed.
- Integrate with CI/CD pipelines for automated testing and deployment.
- Tune resource limits and environment variables for your use case.
Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request. For major changes, open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.