-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
135 lines (129 loc) · 5.03 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# backend environment variables, their defaults if left blank etc.
x-backend-variables: &backend-variables
WAIT_HOSTS: wis2box_adl_db:5432,wis2box_adl_redis:6379
WAIT_TIMEOUT: 120
WIS2BOX_ADL_GUNICORN_NUM_OF_WORKERS: ${WIS2BOX_ADL_GUNICORN_NUM_OF_WORKERS:-4}
WIS2BOX_ADL_GUNICORN_TIMEOUT: ${WIS2BOX_ADL_GUNICORN_TIMEOUT:-300}
DEBUG: ${WIS2BOX_ADL_DEBUG:-False}
WAGTAIL_SITE_NAME: ${WIS2BOX_ADL_SITE_NAME:-"WIS2BOX ADL"}
ADMIN_URL_PATH: ${WIS2BOX_ADL_ADMIN_URL_PATH:-adl-admin}
TIME_ZONE: ${TIME_ZONE:-UTC}
SECRET_KEY: ${SECRET_KEY:?}
ALLOWED_HOSTS: ${ALLOWED_HOSTS}
CSRF_TRUSTED_ORIGINS: ${CSRF_TRUSTED_ORIGINS}
DATABASE_URL: postgis://${WIS2BOX_ADL_DB_USER}:${WIS2BOX_ADL_DB_PASSWORD}@wis2box_adl_db:5432/${WIS2BOX_ADL_DB_NAME}
EMAIL_HOST: ${WIS2BOX_ADL_SMTP_EMAIL_HOST:-}
EMAIL_PORT: ${WIS2BOX_ADL_SMTP_EMAIL_PORT:-}
EMAIL_USE_TLS: ${WIS2BOX_ADL_SMTP_EMAIL_USE_TLS:-}
EMAIL_HOST_USER: ${WIS2BOX_ADL_SMTP_EMAIL_HOST_USER:-}
EMAIL_HOST_PASSWORD: ${WIS2BOX_ADL_SMTP_EMAIL_HOST_PASSWORD:-}
DJANGO_ADMINS: ${WIS2BOX_ADL_ADMINS:-}
WAGTAILADMIN_BASE_URL: ${CMS_BASE_URL:-}
LANGUAGE_CODE: ${WIS2BOX_ADL_DEFAULT_LANGUAGE_CODE:-en}
WIS2BOX_ADL_LOG_LEVEL: ${WIS2BOX_ADL_LOG_LEVEL:-WARN}
WIS2BOX_ADL_CELERY_BEAT_DEBUG_LEVEL: ${WIS2BOX_ADL_CELERY_BEAT_DEBUG_LEVEL:-INFO}
WIS2BOX_CENTRE_ID: ${WIS2BOX_CENTRE_ID:-?}
WIS2BOX_STORAGE_ENDPOINT: ${WIS2BOX_STORAGE_ENDPOINT:-?}
WIS2BOX_STORAGE_USERNAME: ${WIS2BOX_STORAGE_USERNAME:-?}
WIS2BOX_STORAGE_PASSWORD: ${WIS2BOX_STORAGE_PASSWORD:-?}
MIGRATE_ON_STARTUP: ${MIGRATE_ON_STARTUP:-true}
COLLECT_STATICFILES_ON_STARTUP: ${COLLECT_STATICFILES_ON_STARTUP:-true}
REDIS_URL: redis://wis2box_adl_redis:6379/0
WIS2BOX_ADL_PLUGIN_DIR: ${WIS2BOX_ADL_PLUGIN_DIR:-/wis2box_adl/plugins}
WIS2BOX_ADL_PLUGIN_URLS: ${WIS2BOX_ADL_PLUGIN_URLS:-}
WIS2BOX_ADL_PLUGIN_GIT_REPOS: ${WIS2BOX_ADL_PLUGIN_GIT_REPOS:-}
WIS2BOX_ADL_PLUGIN_SETUP_ALREADY_RUN: ${WIS2BOX_ADL_PLUGIN_SETUP_ALREADY_RUN:-}
WIS2BOX_ADL_DISABLE_PLUGIN_INSTALL_ON_STARTUP: ${WIS2BOX_ADL_DISABLE_PLUGIN_INSTALL_ON_STARTUP:-}
services:
wis2box_adl_db:
container_name: wis2box_adl_db
image: timescale/timescaledb-ha:pg15
restart: unless-stopped
environment:
- POSTGRES_USER=${WIS2BOX_ADL_DB_USER:-?}
- POSTGRES_DB=${WIS2BOX_ADL_DB_NAME:-?}
- POSTGRES_PASSWORD=${WIS2BOX_ADL_DB_PASSWORD:-?}
ports:
- "5432"
volumes:
- ${WIS2BOX_ADL_DB_VOLUME:-./docker/db_data/}:/home/postgres/pgdata/data
wis2box_adl_redis:
image: redis:alpine
container_name: wis2box_adl_redis
restart: unless-stopped
wis2box_adl:
container_name: wis2box_adl
image: wis2box_adl
build:
context: .
dockerfile: Dockerfile
args:
- UID=${UID}
- GID=${GID}
restart: unless-stopped
command: gunicorn wsgi
environment:
<<: *backend-variables
expose:
- "8000"
depends_on:
- wis2box_adl_db
- wis2box_adl_redis
ports:
- "8000"
volumes:
- ${WIS2BOX_ADL_STATIC_VOLUME:-./docker/static}:/wis2box_adl/app/src/wis2box_adl/static
- ${WIS2BOX_ADL_MEDIA_VOLUME:-./docker/media}:/wis2box_adl/app/src/wis2box_adl/media
- ${WIS2BOX_ADL_BACKUP_VOLUME:-./docker/backup}:/wis2box_adl/app/src/wis2box_adl/backup
wis2box_adl_celery_worker:
container_name: wis2box_adl_celery_worker
build:
context: .
dockerfile: Dockerfile
args:
- UID=${UID}
- GID=${GID}
restart: unless-stopped
init: true
command: celery-worker
environment:
<<: *backend-variables
WAIT_HOSTS: wis2box_adl_db:5432,wis2box_adl_redis:6379,wis2box_adl:8000
depends_on:
- wis2box_adl_db
- wis2box_adl_redis
volumes:
- ${WIS2BOX_ADL_STATIC_VOLUME:-./docker/static}:/wis2box_adl/app/src/wis2box_adl/static
- ${WIS2BOX_ADL_MEDIA_VOLUME:-./docker/media}:/wis2box_adl/app/src/wis2box_adl/media
- ${WIS2BOX_ADL_BACKUP_VOLUME:-./docker/backup}:/wis2box_adl/app/src/wis2box_adl/backup
wis2box_adl_celery_beat:
container_name: wis2box_adl_celery_beat
build:
context: .
dockerfile: Dockerfile
args:
- UID=${UID}
- GID=${GID}
restart: unless-stopped
init: true
command: celery-beat
environment:
<<: *backend-variables
WAIT_HOSTS: wis2box_adl_db:5432,wis2box_adl_redis:6379,wis2box_adl:8000
depends_on:
- wis2box_adl_db
- wis2box_adl_redis
volumes:
- ${WIS2BOX_ADL_STATIC_VOLUME:-./docker/static}:/wis2box_adl/app/src/wis2box_adl/static
- ${WIS2BOX_ADL_MEDIA_VOLUME:-./docker/media}:/wis2box_adl/app/src/wis2box_adl/media
- ${WIS2BOX_ADL_BACKUP_VOLUME:-./docker/backup}:/wis2box_adl/app/src/wis2box_adl/backup
wis2box_adl_web_proxy:
container_name: wis2box_adl_web_proxy
image: nginx:1.20.2-alpine
restart: unless-stopped
volumes:
- ${WIS2BOX_ADL_STATIC_VOLUME:-./docker/static}:/wagtail_static
- ${WIS2BOX_ADL_MEDIA_VOLUME:-./docker/media}:/wagtail_media
- ./deploy/nginx/nginx.conf:/etc/nginx/nginx.conf
ports:
- ${WIS2BOX_ADL_WEB_PROXY_PORT:-80}:80