-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
93 lines (87 loc) · 2.27 KB
/
docker-compose.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "3.3"
services:
backend:
image: ${IMAGE_REGISTRY}${MAIN_IMAGE}:${IMAGE_TAG}
restart: always
environment:
- DJANGO_ALLOWED_HOSTS
- DJANGO_SETTINGS_MODULE
- DJANGO_SECRET_KEY
- DJANGO_DB_NAME
- DJANGO_APP_URL
- DJANGO_EMAIL_BACKEND
- DJANGO_GMAIL_API_CLIENT_ID
- DJANGO_GMAIL_API_CLIENT_SECRET
- DJANGO_GMAIL_API_REFRESH_TOKEN
- DJANGO_EMAIL_HOST
- DJANGO_EMAIL_PORT
- DJANGO_EMAIL_HOST_USER
- DJANGO_EMAIL_HOST_PASSWORD
- DJANGO_EMAIL_SECURITY
- DJANGO_EMAIL_CLIENT_KEY
- DJANGO_EMAIL_CLIENT_CERTIFICATE
- DJANGO_ACTIVATION_WITH_EMAIL
- DB_USERNAME
- DB_PASSWORD
- SUPERUSER_USERNAME
- SUPERUSER_PASSWORD
- SUPERUSER_EMAIL
- PP_HOST_NAME
- PP_HOST_ADDRESS
- PP_HOST_CONTACT
- PP_ADMIN_NAME
- PP_ADMIN_ADDRESS
- PP_ADMIN_CONTACT
volumes:
- ./custom-policies:/app/custom-policies/
depends_on:
- db
nginx:
image: ${IMAGE_REGISTRY}${STATIC_IMAGE}:${IMAGE_TAG}
ports:
- 8076:80
volumes:
- ./nginx:/etc/nginx/templates
depends_on:
- backend
- db
db:
image: postgres:14-alpine
restart: always
env_file:
- ./.env
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${PG_SUPERUSER_PASSWORD}
- DJANGO_DB_NAME
- DJANGO_DB_USER=${DB_USERNAME}
- DJANGO_DB_PASSWORD=${DB_PASSWORD}
- DB_BACKUP_USER
- DB_BACKUP_PASSWORD
volumes:
- postgresql-data:/var/lib/postgresql/data
- ./create-django-db.sh:/docker-entrypoint-initdb.d/001-create-django-db.sh
pgbackups:
image: prodrigestivill/postgres-backup-local:14
restart: always
user: ${BACKUPS_USER_GROUP}
volumes:
- ${BACKUPS_VOLUME}:/backups
depends_on:
- db
environment:
- POSTGRES_HOST=db
- PGHOST=db
- PGPORT=5432
- PGPASSWORD=${PG_SUPERUSER_PASSWORD}
- PGUSER=postgres
- POSTGRES_DB=${DJANGO_DB_NAME}
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_EXTRA_OPTS=-Z6 --schema=public --blobs
- SCHEDULE=@daily
- BACKUP_KEEP_DAYS=7
- BACKUP_KEEP_WEEKS=4
- BACKUP_KEEP_MONTHS=6
volumes:
postgresql-data: