-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
109 lines (109 loc) · 3.21 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
version: '2'
services:
db:
image: mariadb:10.5
environment:
- MYSQL_ROOT_PASSWORD=randompassword
- MYSQL_DATABASE=compair
- MYSQL_USER=compair
- MYSQL_PASSWORD=compair
volumes:
- ./.data/mysql:/var/lib/mysql
ports:
- "13306:3306"
redis:
image: redis:6
command: redis-server --appendonly yes
volumes:
- ./.data/redis:/data
ports:
- "16379:6379"
app: &app
image: ubcctlt/compair-app
environment:
- DB_DRIVER=mysql+pymysql
- DB_USERNAME=compair
- DB_PASSWORD=compair
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=compair
- DB_CONN_OPTIONS={"charset":"utf8mb4"}
- DEV=1
- CELERY_BROKER_URL=redis://redis:6379
- CELERY_TASK_ALWAYS_EAGER=0
#- GA_TRACKING_ID=12345
- ENFORCE_SSL=0
- MAIL_NOTIFICATION_ENABLED=1
- MAIL_SERVER=mail
- MAIL_PORT=1025
- MAIL_USERNAME=compair
- MAIL_PASSWORD=compair
- MAIL_DEFAULT_SENDER=compair@example.com
- SAML_LOGIN_ENABLED=true
- SAML_UNIQUE_IDENTIFIER=urn:oid:0.9.2342.19200300.100.1.1
- SAML_ATTRIBUTE_USER_ROLE=https://samltest.id/attributes/role
- SAML_INSTRUCTOR_ROLE_VALUES=employee@samltest.id
- SAML_ATTRIBUTE_FIRST_NAME=urn:oid:2.5.4.42
- SAML_ATTRIBUTE_LAST_NAME=urn:oid:2.5.4.4
- SAML_ATTRIBUTE_EMAIL=urn:oid:0.9.2342.19200300.100.1.3
- SAML_ATTRIBUTE_STUDENT_NUMBER=
- SAML_SETTINGS_FILE=/code/deploy/development/dev_saml_settings.json
- SAML_METADATA_URL=https://samltest.id/saml/idp
- SAML_METADATA_ENTITY_ID=http://compair/api/saml/metadata
- SAML_EXPOSE_METADATA_ENDPOINT=true
- SQLALCHEMY_ENGINE_OPTIONS={"pool_recycle":299}
volumes:
- .:/code
- ./.data/persistent:/code/persistent
depends_on:
- db
- redis
- mail
worker: &worker
<<: *app
command: celery --app=celery_worker.celery worker --loglevel=DEBUG
environment:
- C_FORCE_ROOT=1
- DB_DRIVER=mysql+pymysql
- DB_USERNAME=compair
- DB_PASSWORD=compair
- DB_HOST=db
- DB_PORT=3306
- DB_NAME=compair
- DB_CONN_OPTIONS={"charset":"utf8mb4"}
- DEV=1
- CELERY_BROKER_URL=redis://redis:6379
- CELERY_TASK_ALWAYS_EAGER=0
- CELERY_WORKER_MAX_TASKS_PER_CHILD=5
#- CELERY_WORKER_MAX_MEMORY_PER_CHILD=12000 # in KB, e.g. 12000 = 12MB
- ENFORCE_SSL=0
- MAIL_NOTIFICATION_ENABLED=1
- MAIL_SERVER=mail
- MAIL_PORT=1025
- MAIL_USERNAME=compair
- MAIL_PASSWORD=compair
- MAIL_DEFAULT_SENDER=compair@example.com
- SQLALCHEMY_ENGINE_OPTIONS={"pool_recycle":299}
worker_scheduler:
<<: *worker
command: bash -c "rm -f celerybeat.pid && celery --app=celery_worker.celery beat --loglevel=DEBUG"
web:
image: nginx:1.18
volumes:
- ./deploy/docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./compair/static:/compair/app:ro
ports:
- "8080:80"
depends_on:
- app
worker_monitor:
image: mher/flower
command: celery flower --port=5555 --broker=redis://redis:6379
ports:
- "5555:5555"
depends_on:
- redis
mail:
image: mailhog/mailhog:v1.0.0
ports:
- "8025:8025"