-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
54 lines (45 loc) · 1.19 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
version: '2'
services:
usurvey_app:
extends:
file: usurvey-apps.yml
service: usurvey_base
command: gunicorn -b 0.0.0.0:3691 --workers=$USURVEY_APP_WORKERS --max-requests $USURVEY_APP_MAX_REQUESTS --timeout $USURVEY_APP_TIMEOUT mics.wsgi
ports:
- "$USURVEY_APP_PORT:3691"
depends_on:
- redis_server
- db
background_task_workers:
extends:
file: usurvey-apps.yml
service: usurvey_base
command: ./manage.py rqworker default email results-queue ws-notice odk
depends_on:
- redis_server
- db
background_task_schedulers:
extends:
file: usurvey-apps.yml
service: usurvey_base
command: ./manage.py rqscheduler ws-notice
depends_on:
- redis_server
- db
db:
environment:
# pls replace with your own values
POSTGRES_DB: ${USURVEY_DB}
POSTGRES_USER: ${USURVEY_DB_USER}
POSTGRES_PASSWORD: ${USURVEY_DB_PASS}
restart: always
image: postgres:alpine
ports:
- "$USURVEY_DB_PORT:5432"
volumes:
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
redis_server:
restart: always
image: redis:alpine
ports:
- "$USURVEY_REDIS_PORT:6379"