M48: harden demo operations and offsite recovery
This commit is contained in:
+61
-1
@@ -9,13 +9,30 @@ services:
|
||||
web:
|
||||
restart: unless-stopped
|
||||
ports: !override
|
||||
- "1236:80"
|
||||
[]
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
gateway:
|
||||
image: nginx:1.30.4-alpine@sha256:97d490c12ba55b4946b01546d1c3ed324e8d41ab1c9fcb2a616aa470620e5b46
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "1236:80"
|
||||
volumes:
|
||||
- ${MOBILITYOPS_GATEWAY_CONFIG:-./deploy/unraid/gateway.conf}:/etc/nginx/conf.d/default.conf:ro
|
||||
depends_on:
|
||||
web:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
networks: [mobilityops]
|
||||
|
||||
n8n:
|
||||
# The review server already has a shared n8n instance. Keep the bundled service
|
||||
# available for an explicit fallback without starting a second instance by default.
|
||||
@@ -67,3 +84,46 @@ services:
|
||||
retries: 3
|
||||
start_period: 5m
|
||||
networks: [mobilityops]
|
||||
|
||||
offsite-backup:
|
||||
profiles: ["offsite"]
|
||||
image: ${MOBILITYOPS_BACKUP_TOOLS_IMAGE:-mobilityops-backup-tools:development}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: deploy/unraid/Dockerfile.backup-tools
|
||||
args:
|
||||
VCS_REF: ${MOBILITYOPS_SOURCE_REVISION:-development}
|
||||
restart: unless-stopped
|
||||
entrypoint: ["/opt/mobilityops/sync-onedrive-backups.sh"]
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-mobilityops}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-mobilityops}
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:-mobilityops}
|
||||
POSTGRES_HOST: db
|
||||
BACKUP_DESTINATION: /backups
|
||||
BACKUP_OFFSITE_VERIFY_DIR: /offsite-verify
|
||||
BACKUP_OFFSITE_INTERVAL_SECONDS: ${BACKUP_OFFSITE_INTERVAL_SECONDS:-900}
|
||||
BACKUP_RESTORE_DRILL_INTERVAL_SECONDS: ${BACKUP_RESTORE_DRILL_INTERVAL_SECONDS:-604800}
|
||||
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-30}
|
||||
RCLONE_CONFIG: /config/rclone/rclone.conf
|
||||
RCLONE_ONEDRIVE_REMOTE: ${RCLONE_ONEDRIVE_REMOTE:-onedrive}
|
||||
RCLONE_ONEDRIVE_PATH: ${RCLONE_ONEDRIVE_PATH:-FleetOps/backups}
|
||||
volumes:
|
||||
- ${MOBILITYOPS_BACKUP_DIR:-./backups/postgres}:/backups
|
||||
- ${MOBILITYOPS_OFFSITE_VERIFY_DIR:-./backups/offsite-verify}:/offsite-verify
|
||||
- ${MOBILITYOPS_RCLONE_CONFIG_DIR:-./.secrets/rclone}:/config/rclone
|
||||
- ./deploy/unraid:/opt/mobilityops:ro
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"find /backups/latest-offsite-success -mmin -1560 -print -quit | grep -q . && find /backups/latest-offsite-restore-drill -mmin -11520 -print -quit | grep -q .",
|
||||
]
|
||||
interval: 30m
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 10m
|
||||
networks: [mobilityops]
|
||||
|
||||
Reference in New Issue
Block a user