-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
49 lines (46 loc) · 1.18 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
version: '2.1'
services:
hs_hub:
image: hs_hub:latest
depends_on:
mysql_db:
condition: service_healthy
volumes:
- .:/home/node/app/
- /home/node/app/node_modules
ports:
- "${PORT}:${PORT}"
networks:
- internal
- hacker_suite
mysql_db:
container_name: mysql_db
image: mysql:5.7
command: --default-authentication-plugin=mysql_native_password --log_error_verbosity=1
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: hs_hub
ports:
- "${DB_PORT}:${DB_PORT}"
# The healthcheck is used to ensure the database is running before the hub starts
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost --silent"]
timeout: 5s
retries: 10
networks:
- internal
volumes:
- db_store:/var/lib/mysql
# The volume for the database is persistent across launches
volumes:
db_store:
# The network allows multiple containers to connect together
networks:
# internal network for hs_hub services
internal:
driver: bridge
name: internal
# external network for consumer-facing hacker suite services
hacker_suite:
external:
name: hacker_suite