This project uses Docker Compose to manage multiple services. It includes the following services:
- Service Name:
web
- Description: Django web service with Nginx as a reverse proxy and static files server.
- Usage: Exposes Django application on port 8000.
- Service Name:
db
- Description: PostgreSQL database service.
- Usage: Exposes PostgreSQL on port 5432.
- Service Name:
pgadmin
- Description: pgAdmin service for managing PostgreSQL databases.
- Usage: Exposes pgAdmin on port 5050.
- Service Name:
dozzle
- Description: Container logs viewer for monitoring Docker containers.
- Usage: Exposes Dozzle on port 9999.
- Service Name:
vector
- Description: Vector service for shipping logs to BetterStack platform.
- Usage: Exposes Vector for log shipping.
- Service Name:
mongodb
- Description: MongoDB database service.
- Usage: Exposes MongoDB on port 27017.
- Service Name:
mongodb-express
- Description: Web-based UI for MongoDB management.
- Usage: Exposes MongoDB Express on port 8081.
- Service Name:
node-app
- Description: Node.js application with MongoDB connection.
- Usage: Exposes Node.js application on port 3000.
- Service Name:
prometheus
- Description: Prometheus service for monitoring.
- Usage: Exposes Prometheus on port 9090.
- Service Name:
node-exporter
- Description: Prometheus exporter for collecting hardware and OS metrics.
- Usage: Exposes Node Exporter on port 9100.
- Service Name:
nginx-exporter
- Description: Prometheus exporter for Nginx metrics.
- Usage: Exposes Nginx Exporter on port 9913.
- Service Name:
grafana
- Description: Grafana service for visualization and monitoring.
- Usage: Exposes Grafana on port 3000.
- Services:
mongodb
,mongodb-express
,node-app
- Description: MongoDB services for a Node.js application.
- Services:
prometheus
,node-exporter
,nginx-exporter
- Description: Prometheus and related exporters for monitoring.
- Clone the repository.
- Copy
.env.example
to.env
and adjust the configurations. - Run
docker-compose -f docker-compose.prod.yml up -d
to start the services.
Feel free to explore each service in detail. Happy coding!
Current Issues
- Postgres DB keeps logging - role 'root' does not exist. Still figuring out how to take care of this. The db works regardless though.
- Shipping logs using vector still needs a bit of work.
- Postgres has a new error. Though at the
LOG
severity - invalid length of statup packet. The internet says it has to do with connections to the DB but only the django service id currently connected. - Mongodb express keeps trying to connect to mongo before mongo is fully operational even with the
depends_on
attribute - Graphana is a pain.