-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
137 lines (136 loc) · 2.87 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
---
version: "3.8"
volumes:
mysql:
services:
externallinks:
image: quay.io/wikipedialibrary/externallinks:${EXTERNALLINKS_TAG}
build:
context: .
target: externallinks
env_file:
- ".env"
depends_on:
- db
ports:
- "8000:8000"
command: ["/app/bin/gunicorn.sh"]
volumes:
- type: bind
source: ./
target: /app
- type: bind
source: ${HOST_BACKUP_DIR}
target: /app/backup
deploy:
resources:
reservations:
cpus: "0.25"
memory: "384M"
crons:
image: quay.io/wikipedialibrary/externallinks:${EXTERNALLINKS_TAG}
build:
context: .
target: externallinks
env_file:
- ".env"
depends_on:
- db
command: ["python", "manage.py", "cronloop"]
volumes:
- type: bind
source: ./
target: /app
- type: bind
source: ${HOST_BACKUP_DIR}
target: /app/backup
deploy:
resources:
reservations:
cpus: "0.25"
memory: "384M"
db:
image: quay.io/wikipedialibrary/mariadb:10-updated
env_file:
- ".env"
ports:
- "3306:3306"
volumes:
- type: volume
source: mysql
target: /var/lib/mysql
volume: {}
- type: bind
source: ./db.cnf
target: /etc/mysql/conf.d/db.cnf
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-plinks"]
timeout: 20s
interval: 10s
retries: 10
deploy:
resources:
reservations:
cpus: "0.5"
memory: "2.5G"
nginx:
image: quay.io/wikipedialibrary/nginx:latest-updated
volumes:
- type: volume
target: /var/lib/nginx/cache
- type: bind
source: ./nginx.conf
target: /etc/nginx/conf.d/default.conf
- type: bind
source: ./robots.txt
target: /app/robots.txt
- type: bind
source: ./static
target: /app/static
ports:
- "80:80"
depends_on:
- externallinks
deploy:
resources:
reservations:
cpus: "0.25"
memory: "32M"
eventstream:
image: quay.io/wikipedialibrary/eventstream:${EVENTSTREAM_TAG}
build:
context: .
target: eventstream
depends_on:
- db
env_file:
- ".env"
command:
[
"python",
"django_wait_for_migrations.py",
"linkevents_collect",
"--historical",
]
volumes:
- type: bind
source: ./
target: /app
deploy:
resources:
reservations:
cpus: "0.25"
memory: "48M"
cache:
image: quay.io/wikipedialibrary/memcached:latest
ports:
- "11211:11211"
entrypoint:
- memcached
depends_on:
- externallinks
deploy:
resources:
reservations:
cpus: "0.25"
memory: "64M"