-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
36 lines (36 loc) · 1012 Bytes
/
compose.dev.yml
File metadata and controls
36 lines (36 loc) · 1012 Bytes
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
services:
postgres:
image: postgres
restart: always
volumes:
- ./data:/var/lib/postgresql/data
env_file:
- path: .env
required: true
ports:
- "5432:5432"
postgres_backup:
# Build locally for development
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgres
volumes:
- ./backups:/backups
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_HOST=postgres
- BACKUP_INTERVAL=86400 # 24 hours
- RETENTION_DAYS=7 # Keep local backups for 7 days
- S3_RETENTION_DAYS=30 # Keep S3 backups for 30 days (optional)
# S3 configuration (set these in .env file)
# - S3_BUCKET=your-backup-bucket
# - S3_PREFIX=db-backups
# AWS credentials should be set in .env file:
# - AWS_ACCESS_KEY_ID=your-access-key
# - AWS_SECRET_ACCESS_KEY=your-secret-key
# - AWS_DEFAULT_REGION=us-east-1
env_file:
- path: .env
required: true