This repository provides a ready-to-use Docker Compose setup for common database and monitoring needs. It bundles persistent PostgreSQL and Redis services, automated backups via SQLBak, and a full Prometheus monitoring stack with cAdvisor and exporters. Use it as a starting point for local development or small deployments.
- PostgreSQL – Primary relational database with persistent volume and credentials supplied through environment variables.
- Redis – In-memory key‑value store configured with password protection and persistent volume.
- SQLBak – Automated backup service that uploads database dumps to external storage using your SQLBak account key.
- Prometheus – Monitoring server that scrapes metrics from exporters and stores them on a dedicated volume.
- PostgreSQL Exporter and Redis Exporter – Expose database metrics for Prometheus.
- Node Exporter – Collects host machine metrics.
- cAdvisor – Container resource monitoring, also scraped by Prometheus.
-
Copy the example environment file and adjust credentials:
cp .env.example .env # Edit .env with your preferred usernames, passwords and SQLBak tokenIf you don't have a SQLBak token yet, sign up for a free account at https://sqlbak.com to generate one.
-
Launch the stack:
docker compose up -d
-
Access services:
- PostgreSQL:
localhost:5432 - Redis:
localhost:6379 - Prometheus UI: http://localhost:9090
- cAdvisor UI: http://localhost:8080
- PostgreSQL:
restore_db.md– Notes for restoring databases.tunning_db.md– Tips for performance tuning.prometheus/– Custom Prometheus configuration.
This project is released under the MIT License.
