forked from WikipediaLibrary/TWLight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (51 loc) · 1.16 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
---
version: '3.2'
volumes:
mysql:
services:
db:
image: mariadb:10
volumes:
- mysql:/var/lib/mysql
- type: bind
source: ./conf/db.cnf
target: /etc/mysql/conf.d/db.cnf
- type: bind
source: ./bin/twlight_mysql_init.sh
target: /docker-entrypoint-initdb.d/twlight_mysql_init.sh
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
secrets:
- DJANGO_DB_NAME
- DJANGO_DB_USER
- DJANGO_DB_PASSWORD
- MYSQL_ROOT_PASSWORD
twlight:
build:
context: .
command: /venv/bin/gunicorn -b 0.0.0.0:80 TWLight.wsgi
volumes:
- type: bind
source: ./media
target: /app/media
depends_on:
- 'db'
secrets:
- DJANGO_DB_NAME
- DJANGO_DB_USER
- DJANGO_DB_PASSWORD
- SECRET_KEY
- TWLIGHT_OAUTH_CONSUMER_KEY
- TWLIGHT_OAUTH_CONSUMER_SECRET
- TWLIGHT_EZPROXY_SECRET
web:
image: nginx:latest
volumes:
- type: bind
source: ./media
target: /app/media
- type: bind
source: ./TWLight/templates/500
target: /app/500
depends_on:
- 'twlight'