-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
51 lines (51 loc) · 1.42 KB
/
docker-compose.yaml
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
version: "3.9"
services:
app:
build: .
depends_on:
- db
ports:
- 5000:5000
environment:
SQLALCHEMY_DATABASE_URI: postgresql://sqluser:${DB_PASSWORD}@db:5432/election
REDIRECT_HOST: https://election.iiit.ac.in
volumes:
- election_static:/opt/app/static
adminer:
image: adminer
restart: always
ports:
- 5001:8080
db:
image: postgres:latest
volumes:
- election_db:/var/lib/postgresql/data
environment:
POSTGRES_USER: sqluser
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: election
TZ: Asia/Kolkata
PGTZ: Asia/Kolkata
pgbackups:
image: prodrigestivill/postgres-backup-local
restart: always
volumes:
- /var/opt/pgbackups:/backups
user: postgres:postgres
depends_on:
- db
environment:
- POSTGRES_HOST=db
- POSTGRES_DB=election
- POSTGRES_USER=sqluser
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_EXTRA_OPTS=-Z6 --schema=public --blobs
- SCHEDULE=@every 30m
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=2
- HEALTHCHECK_PORT=18423
volumes:
election_static:
external: true
election_db: