-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
135 lines (127 loc) · 3.27 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
version: '3.1'
services:
web:
depends_on:
- fpm
image: nginx:1.13
ports:
- "8080:80"
volumes:
- ./app:/app
- ./config/site.conf:/etc/nginx/conf.d/default.conf
networks:
- app-network
blob:
image: minio/minio
ports:
- "8082:9000"
volumes:
- ./db_blob:/data
command: ["server", "/data"]
networks:
- app-network
environment:
MINIO_ACCESS_KEY_FILE: "db_blob_access_key"
MINIO_SECRET_KEY_FILE: "db_blob_secret_key"
secrets:
- db_blob_access_key
- db_blob_secret_key
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
BLOB_API: s3
BLOB_HOST: blob:9000
BLOB_ACCESS_KEY_FILE: /run/secrets/db_blob_access_key
BLOB_SECRET_KEY_FILE: /run/secrets/db_blob_secret_key
# No, these aren't the same ones used on tunnelgram.com.
WEB_PUSH_VAPID_PRIVATE_KEY: l8YS2iO3ZdEMgC6HqC6lnDARgwLXvB2TJgLDCYDmpTY
WEB_PUSH_VAPID_PUBLIC_KEY: BMgNJ6YSV1Dv3VkazCKC004Ft33dcqscBDuvh_R3Qk98k5_nOCb-dh7r56GsRuen-_DcLS4-Bf1bcjbpTw6ELVY
# You also need to set this in cordova/www/js/index.js
ONESIGNAL_APP_ID: 113ebc97-79d7-4f63-9f20-045913af0a49
ONESIGNAL_REST_API_KEY_FILE: /run/secrets/onesignal_rest_api_key
secrets:
- db_password
- tilmeld_secret
- db_blob_access_key
- db_blob_secret_key
- onesignal_rest_api_key
networks:
app-network:
driver: bridge
secrets:
db_password:
file: db_password.txt
db_root_password:
file: db_root_password.txt
db_blob_access_key:
file: db_blob_access_key.txt
db_blob_secret_key:
file: db_blob_secret_key.txt
tilmeld_secret:
file: tilmeld_secret.txt
onesignal_rest_api_key:
file: onesignal_rest_api_key.txt