-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
77 lines (69 loc) · 1.79 KB
/
docker-compose.example.yml
File metadata and controls
77 lines (69 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: '3.8'
services:
# Example PostgreSQL database
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: myapp
POSTGRES_USER: myapp
POSTGRES_PASSWORD: secret
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app_network
restart: unless-stopped
# Example MySQL database
mysql:
image: mysql:8
environment:
MYSQL_DATABASE: users
MYSQL_USER: users
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: rootsecret
volumes:
- mysql_data:/var/lib/mysql
networks:
- app_network
restart: unless-stopped
# DB Backup Web App
db-backup:
build: .
# Or use pre-built image:
# image: db-backup-app:latest
ports:
- "3000:3000"
environment:
# Required: Encryption key for storing passwords (min 32 characters)
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-change-this-to-a-secure-32-character-key}
# Optional: S3 Configuration
- S3_REGION=${S3_REGION:-us-east-1}
- S3_BUCKET=${S3_BUCKET}
- S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID}
- S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}
# - S3_ENDPOINT= # For S3-compatible services like MinIO
# Optional: Application Settings
- AUTO_DISCOVER=false
- TZ=UTC
- LOG_LEVEL=info
- MAX_BACKUP_RETENTION_DAYS=365
- BACKUP_STORAGE_PATH=/app/data/backups
- DATABASE_PATH=/app/data/db/app.db
# Optional: Server Settings
- PORT=3000
- HOSTNAME=0.0.0.0
volumes:
# Persistent storage for database and backups
- backup_data:/app/data
networks:
- app_network
depends_on:
- postgres
- mysql
restart: unless-stopped
networks:
app_network:
driver: bridge
volumes:
postgres_data:
mysql_data:
backup_data: