forked from oriolsuils/chalearn-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
146 lines (143 loc) · 4.71 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
version: "3.7"
services:
traefik:
image: "traefik"
restart: always
ports:
- "8080:80"
- "8443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- traefik_volume:/letsencrypt
command:
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.http.address=:80"
- "--entrypoints.https.address=:443"
- "--certificatesresolvers.chalearnlap-tlschallenge.acme.tlschallenge=true"
- "--certificatesresolvers.chalearnlap-tlschallenge.acme.email=xbaro@uoc.edu"
- "--certificatesresolvers.chalearnlap-tlschallenge.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.chalearnlap-tlschallenge.acme.httpchallenge.entrypoint=http"
db:
image: mariadb:10.7
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
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}
MINIO_BROWSER_REDIRECT_URL: 'https://data-console.${BASE_DOMAIN:-chalearnlap.aiwell.uoc.edu}'
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9001/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.chalearnlap-data.rule=Host(`data.${BASE_DOMAIN:-chalearnlap.aiwell.uoc.edu}`)"
- "traefik.http.routers.chalearnlap-data.entrypoints=https"
- "traefik.http.routers.chalearnlap-data.tls=true"
- "traefik.http.routers.chalearnlap-data.tls.certresolver=chalearnlap-tlschallenge"
- "traefik.http.services.chalearnlap-data-service.loadBalancer.sticky.cookie=true"
- "traefik.http.services.chalearnlap-data-service.loadbalancer.server.port=9000"
- "traefik.http.routers.chalearnlap-data.service=chalearnlap-data-service"
- "traefik.http.routers.chalearnlap-datacons.rule=Host(`data-console.${BASE_DOMAIN:-chalearnlap.aiwell.uoc.edu}`)"
- "traefik.http.routers.chalearnlap-datacons.entrypoints=https"
- "traefik.http.routers.chalearnlap-datacons.tls=true"
- "traefik.http.routers.chalearnlap-datacons.tls.certresolver=chalearnlap-tlschallenge"
- "traefik.http.services.chalearnlap-datacons-service.loadBalancer.sticky.cookie=true"
- "traefik.http.services.chalearnlap-datacons-service.loadbalancer.server.port=9001"
- "traefik.http.routers.chalearnlap-datacons.service=chalearnlap-datacons-service"
web:
image: chalearnlap/web:latest
build:
context: .
dockerfile: docker/Dockerfile
restart: always
environment:
DEBUG:
SECRET_KEY: ${DJANGO_SECRET}
ALLOWED_HOSTS:
SITE_ID:
DB_ENGINE:
DB_HOST:
DB_NAME:
DB_USER:
DB_PASSWORD:
STORAGE_ACCESS_KEY:
STORAGE_SECRET_KEY:
STORAGE_BUCKET_NAME:
STORAGE_REGION:
STORAGE_URL:
STORAGE_PUBLIC_BUCKET_NAME:
REDIS_HOST:
REDIS_PORT:
SENTRY_ENABLED:
SENTRY_DSN:
SENTRY_RELEASE:
SENTRY_SERVER_NAME:
SENTRY_ENVIRONMENT:
EMAIL_HOST:
EMAIL_PORT:
EMAIL_HOST_USER:
EMAIL_HOST_PASSWORD:
EMAIL_FROM:
PROMETHEUS_GW:
depends_on:
- db
- redis
- minio
labels:
- "traefik.enable=true"
- "traefik.http.routers.chalearnlap.rule=Host(`${BASE_DOMAIN:-chalearnlap.aiwell.uoc.edu}`)"
- "traefik.http.routers.chalearnlap.entrypoints=https"
- "traefik.http.routers.chalearnlap.tls=true"
- "traefik.http.routers.chalearnlap.tls.certresolver=chalearnlap-tlschallenge"
- "traefik.http.services.chalearnlap-service.loadBalancer.sticky.cookie=true"
- "traefik.http.services.chalearnlap-service.loadbalancer.server.port=5000"
- "traefik.http.routers.chalearnlap.service=chalearnlap-service"
volumes:
- web_media_volume:/code/media_cdn
volumes:
traefik_volume:
driver_opts:
type: none
device: ${PWD}/_data/traefik
o: bind
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
web_media_volume:
driver_opts:
type: none
device: ${PWD}/_data/web_media
o: bind