-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (54 loc) · 2.26 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (54 loc) · 2.26 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
services:
postback:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
# PostgreSQL connection
PGHOST: ${PGHOST}
PGPORT: ${PGPORT:-5432}
PGDATABASE: ${PGDATABASE}
PGUSER: ${PGUSER}
PGPASSWORD: ${PGPASSWORD}
# Storage backend: "local" or "rsync"
STORAGE_BACKEND: ${STORAGE_BACKEND:-local}
# ── local backend ──────────────────────────────────────────────────────
LOCAL_STORAGE_PATH: /backup
# ── rsync backend (ignored when STORAGE_BACKEND=local) ────────────────
RSYNC_HOST: ${RSYNC_HOST:-}
RSYNC_USER: ${RSYNC_USER:-}
RSYNC_PATH: ${RSYNC_PATH:-}
RSYNC_SSH_KEY: /secrets/rsync_key
RSYNC_PORT: ${RSYNC_PORT:-22}
# Scheduler (seconds between runs, default 1 hour)
BACKUP_INTERVAL_SECS: ${BACKUP_INTERVAL_SECS:-3600}
# UTC offset for retention checkpoints, e.g. "+02:00"
BACKUP_TIMEZONE: ${BACKUP_TIMEZONE:-UTC}
# Encryption (optional)
ENCRYPTION_PUBLIC_KEY: ${ENCRYPTION_PUBLIC_KEY:-}
# Retention knobs (optional — these are the defaults)
# KEEP_HOURLY: "6"
# KEEP_6H: "4"
# KEEP_DAILY: "28"
# Slack notifications (optional)
# SLACK_BOT_TOKEN: "xoxb-..."
# SLACK_CHANNEL: "#db-alerts"
# SLACK_NOTIFY_ON: "success,failure"
RUST_LOG: ${RUST_LOG:-info}
volumes:
# ── local backend: mount a host directory or named volume ──────────────
- ${LOCAL_BACKUP_PATH:-./backups}:/backup
# ── rsync backend: mount your SSH private key ──────────────────────────
# Uncomment when STORAGE_BACKEND=rsync
# - ${RSYNC_SSH_KEY_PATH}:/secrets/rsync_key:ro
# Temp dump dir in RAM — never touches persistent disk
- type: tmpfs
target: /tmp/postback
tmpfs:
mode: 0777
# To use a named volume instead of a host path, uncomment both blocks below:
# volumes:
# postback_data: