This project is part of roadmap.sh DevOps projects.
This project simulates a real-world, production-like environment using Docker. It includes a multi-service setup with best practices like custom base images, multi-stage builds, Docker secrets, persistent volumes, health checks, optimized Dockerfiles, logging, and more.
The service i maked is simplate Note taking app.
- Next.js (Frontend)
- Node.js + Express (Backend)
- MongoDB (Database)
- Redis (Cache)
- Nginx (Reverse Proxy)
- Grafana (Data Visualization)
- Loki (Storing Logs)
- Promtail (Log Collecting from Docker)
- Docker (Containers)
- Docker Compose
- Frontend http://localhost:3000
- Backend http://localhost:3000/tasks
- Grafana http://localhost:3000/grafana
- MongoDB (Internal only) http://mongodb://27017/tasks
- Redis (Internal only) http://redis:6379
- Loki (Internal only) http://loki:3100
- Clone the Repository
git clone https://github.com/cilginc/multiservice-docker.git
cd multiservice-docker
- Run the Docker Compose file
docker compose up -d --build
- Simply go to http://localhost:3000/grafana.
- User:
admin
- Password:
admin
- Now go to Drilldown -> Logs. Now you can see all the log files.
- You need to manage Github Secrets first:
REMOTE_HOST
:IP of the serverREMOTE_USER
: User of the serverSSH_KEY
: Your private SSH keySSH_PORT
: Your SSH portREMOTE_PATH
: Remote path of directory you want such as/home/user/deploy
- Don't Forget to change workflow permissions to read and write.
- This step is required for adding containers to GHCR.
- Now Github Actions will automaticly deploy your project after push.