forked from PalisadoesFoundation/switchmap-ng
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (91 loc) · 2.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (91 loc) · 2.3 KB
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
version: "3.8"
services:
mysql:
image: mysql:8.0
container_name: switchmap-mysql
environment:
MYSQL_DATABASE: switchmap
MYSQL_USER: switchmap
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DEFAULT_AUTHENTICATION_PLUGIN: mysql_native_password
command: >
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
--sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
volumes:
- mysql_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "3307:3306"
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"switchmap-mysql",
"-u",
"switchmap",
"--password=${MYSQL_PASSWORD}",
]
interval: 10s
timeout: 5s
retries: 5
networks:
- switchmap_network
switchmap-api:
build: .
container_name: switchmap-api
environment:
- SERVICE_TYPE=api
- MYSQL_HOST=switchmap-mysql
- MYSQL_PORT=3306
- MYSQL_DATABASE=switchmap
- MYSQL_USER=switchmap
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- BIND_ADDRESS=0.0.0.0
- API_LISTEN_ADDRESS=0.0.0.0
- API_BIND_PORT=7000
ports:
- "7000:7000"
volumes:
- ./etc/config.yaml:/opt/switchmap-ng/etc/config.yaml
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
networks:
- switchmap_network
switchmap-dashboard:
build: .
container_name: switchmap-dashboard
environment:
- SERVICE_TYPE=dashboard
- MYSQL_HOST=switchmap-mysql
- MYSQL_PORT=3306
- MYSQL_DATABASE=switchmap
- MYSQL_USER=switchmap
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- BIND_ADDRESS=0.0.0.0
- API_LISTEN_ADDRESS=0.0.0.0
- API_BIND_PORT=7001
ports:
- "7001:7001"
volumes:
- ./etc/config.yaml:/opt/switchmap-ng/etc/config.yaml
depends_on:
mysql:
condition: service_healthy
switchmap-api:
condition: service_started
restart: unless-stopped
networks:
- switchmap_network
networks:
switchmap_network:
name: switchmap_network
volumes:
mysql_data: