This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
100 lines (93 loc) · 2.05 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
version: '3.1'
services:
web:
depends_on:
- fpm
image: nginx:1.19
ports:
- "8080:80"
volumes:
- ./app:/app
- ./config/site.conf:/etc/nginx/conf.d/default.conf
networks:
- app-network
db:
build:
context: ./config
dockerfile: Dockerfile-mysql
command: "--innodb_use_native_aio=0"
volumes:
- ./db_data:/var/lib/mysql
networks:
- app-network
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_DATABASE: nymph
MYSQL_USER: nymph
MYSQL_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_root_password
- db_password
mta:
build:
context: ./config
dockerfile: Dockerfile-mta
volumes:
- ./mail:/var/spool/postfix
networks:
- app-network
pubsub:
depends_on:
- db
build:
context: ./config
dockerfile: Dockerfile-pubsub
volumes:
- ./app:/app
command: ["./wait-for-it.sh", "db:3306", "-t", "120", "--", "php", "/app/pubsub.php"]
ports:
- "8081:8080"
networks:
- app-network
environment:
MYSQL_HOST: db:3306
MYSQL_DATABASE: nymph
MYSQL_USER: nymph
MYSQL_PASSWORD_FILE: /run/secrets/db_password
TILMELD_SECRET_FILE: /run/secrets/tilmeld_secret
secrets:
- db_password
- tilmeld_secret
fpm:
depends_on:
- db
- mta
- pubsub
build:
context: ./config
dockerfile: Dockerfile-fpm
volumes:
- ./app:/app
- ./maintenance:/maintenance
networks:
- app-network
environment:
MYSQL_HOST: db:3306
MYSQL_DATABASE: nymph
MYSQL_USER: nymph
MYSQL_PASSWORD_FILE: /run/secrets/db_password
PUBSUB_HOST: pubsub:8080
TILMELD_SECRET_FILE: /run/secrets/tilmeld_secret
secrets:
- db_password
- tilmeld_secret
networks:
app-network:
driver: bridge
secrets:
db_password:
file: db_password.txt
db_root_password:
file: db_root_password.txt
tilmeld_secret:
file: tilmeld_secret.txt