Automated setup for Ubuntu servers running PostgreSQL and Promtail via Docker Compose. Features an interactive provisioning script with secure defaults.
chmod +x provision.sh
sudo ./provision.shFollow the interactive menu to select components.
deploy-scripts/
├── provision.sh # Main interactive setup script
├── grafana/
│ ├── .env.example # Promtail environment template
│ ├── deploy-promtail.sh # Promtail deployment script
│ ├── docker-compose.yml # Promtail Docker Compose config
│ └── promtail-config.yaml # Promtail logging configuration
├── postgresql/
│ ├── .env.example # PostgreSQL environment template
│ ├── deploy-postgresql.sh # PostgreSQL deployment script
│ ├── docker-compose.yml # PostgreSQL Docker Compose config
│ ├── postgres-backup.sh # Manual backup script
│ └── postgres-backup-cron.sh # Automated backup cron setup
├── .gitignore # Git ignore rules
├── LICENSE # MIT License
└── README.md # This file
Before deploying services, copy and configure environment files:
cp postgresql/.env.example postgresql/.env cp grafana/.env.example grafana/.env
Edit the .env files with your credentials.
- Requires root privileges for system-level changes
- Creates a dedicated deploy_user with Docker group access
- Generates SSH keys for automation and disables empty-password logins
MIT