--
This commit is contained in:
@@ -29,6 +29,26 @@ services:
|
||||
restart: unless-stopped
|
||||
logging: *default-logging
|
||||
|
||||
# Daily pg_dump of the whole database into ./backups on the host, the last 14 days kept.
|
||||
# See scripts/backup.sh for how to restore one.
|
||||
backup:
|
||||
image: postgres:16-alpine
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
PGHOST: db
|
||||
PGUSER: ${POSTGRES_USER:-pharma}
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
|
||||
PGDATABASE: ${POSTGRES_DB:-pharma}
|
||||
BACKUP_KEEP_DAYS: ${BACKUP_KEEP_DAYS:-14}
|
||||
volumes:
|
||||
- ./backups:/backups
|
||||
- ./scripts/backup.sh:/backup.sh:ro
|
||||
entrypoint: ["/bin/sh", "/backup.sh"]
|
||||
restart: unless-stopped
|
||||
logging: *default-logging
|
||||
|
||||
api:
|
||||
build: .
|
||||
depends_on:
|
||||
@@ -42,6 +62,7 @@ services:
|
||||
PDF_STORAGE_PATH: /srv/storage/pdf
|
||||
BACKDATING_WINDOW_DAYS: ${BACKDATING_WINDOW_DAYS:-7}
|
||||
SUBMISSION_DEADLINE_DAYS: ${SUBMISSION_DEADLINE_DAYS:-1}
|
||||
PLAN_AHEAD_DAYS: ${PLAN_AHEAD_DAYS:-2}
|
||||
WEB_CONCURRENCY: ${WEB_CONCURRENCY:-2}
|
||||
volumes:
|
||||
- pdfstore:/srv/storage/pdf
|
||||
|
||||
Reference in New Issue
Block a user