forked from WikipediaLibrary/TWLight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (75 loc) · 1.88 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
---
version: '3.4'
volumes:
mysql:
services:
db:
ports:
- "3306:3306"
image: quay.io/wikipedialibrary/mariadb:10-updated
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:
# https://mariadb.com/kb/en/mariadb-docker-environment-variables/
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
# Any non-empty value will do
- MARIADB_AUTO_UPGRADE=TRUE
# Any non-empty value will do
- MARIADB_DISABLE_UPGRADE_BACKUP=TRUE
secrets:
- DJANGO_DB_NAME
- DJANGO_DB_USER
- DJANGO_DB_PASSWORD
- MYSQL_ROOT_PASSWORD
twlight:
build:
context: .
args:
- REQUIREMENTS_FILE=wmf.txt
command: ["/venv/bin/gunicorn", "TWLight.wsgi"]
volumes:
- type: bind
source: ./media
target: /app/media
depends_on:
- 'db'
secrets:
- DJANGO_DB_NAME
- DJANGO_DB_USER
- DJANGO_DB_PASSWORD
- DKIM_PRIVATE_KEY
- SECRET_KEY
- TWLIGHT_OAUTH_CONSUMER_KEY
- TWLIGHT_OAUTH_CONSUMER_SECRET
- TWLIGHT_EZPROXY_SECRET
web:
ports:
- "80:80"
image: quay.io/wikipedialibrary/nginx:latest-updated
volumes:
- type: bind
source: ./conf/robots.txt
target: /app/robots.txt
- type: bind
source: ./TWLight/static/img/favicon.ico
target: /app/favicon.ico
- type: bind
source: ./media
target: /app/media
- type: bind
source: ./TWLight/templates/500
target: /app/500
depends_on:
- 'twlight'
# - 'syslog'
# syslog:
# build:
# context: syslog
# environment:
# - MATOMO_FQDN=analytics-wikipedialibrary.wmflabs.org