-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
159 lines (153 loc) · 4.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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: "3.7"
services:
traefik:
image: "traefik:v2.6"
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.http.address=:80"
ports:
- "8081:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
db:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- db_volume:/var/lib/mysql
# ports:
# - 3307:3306
redis:
image: redis:alpine
restart: always
volumes:
- redis_volume:/data
# minio:
# image: minio/minio
# volumes:
# - minio_volume:/data
# restart: always
# environment:
# MINIO_REGION_NAME: ${STORAGE_REGION}
# MINIO_ACCESS_KEY: ${STORAGE_ACCESS_KEY}
# MINIO_SECRET_KEY: ${STORAGE_SECRET_KEY}
# command: server /data --console-address ":9001"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:9001/minio/health/live"]
# interval: 30s
# timeout: 20s
# retries: 3
# ports:
# - 19000:9000
# - 19001:9001
web: &pelp-base
image: pelp/web:latest
build:
context: .
dockerfile: docker/Dockerfile
restart: always
environment:
DEBUG: 0
DJANGO_SECRET: ${DJANGO_SECRET}
ALLOWED_HOSTS: ${ALLOWED_HOSTS}
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS}
ROOT_LOG_LEVEL: ${ROOT_LOG_LEVEL}
DJANGO_LOG_LEVEL: ${DJANGO_LOG_LEVEL}
DB_ENGINE: ${DB_ENGINE}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
STORAGE_ACCESS_KEY: ${STORAGE_ACCESS_KEY}
STORAGE_SECRET_KEY: ${STORAGE_SECRET_KEY}
STORAGE_BUCKET_NAME: ${STORAGE_BUCKET_NAME}
STORAGE_REGION: ${STORAGE_REGION}
STORAGE_URL: ${STORAGE_URL}
STORAGE_PUBLIC_BUCKET_NAME: ${STORAGE_PUBLIC_BUCKET_NAME}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
SENTRY_ENABLED: ${SENTRY_ENABLED}
SENTRY_DSN: ${SENTRY_DSN}
SENTRY_RELEASE: ${SENTRY_RELEASE}
SENTRY_SERVER_NAME: ${SENTRY_SERVER_NAME}
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
EXECUTION_PATH: ${EXECUTION_PATH}
DOCKER_MOUNT_ROOT_PATH: ${DOCKER_MOUNT_ROOT_PATH}
DOCKER_HOST: ${DOCKER_HOST}
MAX_PARALLEL_RUNS: ${MAX_PARALLEL_RUNS}
EMAIL_HOST: ${EMAIL_HOST}
EMAIL_PORT: ${EMAIL_PORT}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
EMAIL_FROM: ${EMAIL_FROM}
IMAP_SERVER: ${IMAP_SERVER}
IMAP_USER: ${IMAP_USER}
IMAP_PASSWORD: ${IMAP_PASSWORD}
PROMETHEUS_GW: ${PROMETHEUS_GW}
CANVAS_API_URL: ${CANVAS_API_URL}
CANVAS_API_TOKEN: ${CANVAS_API_TOKEN}
depends_on:
- db
- redis
#- minio
ports:
- 8080:5000
labels:
- "traefik.enable=true"
- "traefik.http.routers.pelp.rule=Host(`pelp.uoc.edu`, `pelp.sunai.uoc.edu`)"
- "traefik.http.routers.pelp.entrypoints=http"
- "traefik.http.services.pelp-service.loadBalancer.sticky.cookie=true"
- "traefik.http.services.pelp-service.loadbalancer.server.port=5000"
- "traefik.http.routers.pelp.service=pelp-service"
worker:
<<: *pelp-base
command: /venv/bin/celery -A pelp worker -l warning --concurrency 4 # -P gevent
privileged: true
restart: always
# deploy:
# resources:
# limits:
# memory: 5g
depends_on:
- db
- redis
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- submission_volume:/data/submission
ports: []
labels: []
worker-beat:
<<: *pelp-base
command: /venv/bin/celery -A pelp beat -l warning --scheduler django_celery_beat.schedulers:DatabaseScheduler
restart: always
depends_on:
- db
- redis
ports: []
volumes: []
volumes:
db_volume:
driver_opts:
type: none
device: ${PWD}/_data/db
o: bind
redis_volume:
driver_opts:
type: none
device: ${PWD}/_data/redis
o: bind
minio_volume:
driver_opts:
type: none
device: ${PWD}/_data/minio
o: bind
submission_volume:
driver_opts:
type: none
device: ${PWD}/_data/submission
o: bind