-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocker-compose.yml
82 lines (81 loc) · 1.51 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
---
version: "2.1"
volumes:
mysql:
services:
migrate:
build: .
entrypoint: python manage.py migrate
restart: on-failure
networks:
- main
env_file:
- '.env'
depends_on:
db:
condition: service_healthy
volumes:
- ./:/app
app:
build: .
networks:
- main
env_file:
- '.env'
depends_on:
- 'migrate'
ports:
- "8000:8000"
volumes:
- ./:/app
db:
image: quay.io/wikipedialibrary/mariadb:10-updated
env_file:
- '.env'
ports:
- "3306:3306"
networks:
- main
restart: unless-stopped
command: >
mysqld
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-phashtagserver"]
timeout: 20s
retries: 10
volumes:
- type: bind
source: /usr/local/backup
target: /backup
- type: volume
source: mysql
target: /var/lib/mysql
volume: {}
nginx:
image: quay.io/wikipedialibrary/nginx:latest-updated
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./static:/app/static
ports:
- "80:80"
networks:
- main
depends_on:
- app
scripts:
build:
context: .
dockerfile: 'Dockerfile-scripts'
restart: unless-stopped
networks:
- main
env_file:
- '.env'
cap_add:
- SYS_PTRACE
depends_on:
- app
networks:
main: