-
Notifications
You must be signed in to change notification settings - Fork 42
/
docker-compose.yaml
68 lines (64 loc) · 1.38 KB
/
docker-compose.yaml
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
x-mariadb-variables: &mariadb-variables
MARIADB_USER: havana
MARIADB_PASSWORD: goldfish
MARIADB_ROOT_PASSWORD: yourstrongpassword
MARIADB_DATABASE: havana
x-havana-variables: &havana-variables
MYSQL_USERNAME: havana
MYSQL_PASSWORD: goldfish
MYSQL_DATABASE: havana
services:
havana-server:
depends_on:
mariadb:
condition: service_healthy
build:
context: .
dockerfile: Dockerfile-Server
ports:
- "12321:12321"
- "12322:12322"
- "12323:12323"
networks:
- havana
environment:
<<: *havana-variables
restart: on-failure
havana-web:
depends_on:
mariadb:
condition: service_healthy
build:
context: .
dockerfile: Dockerfile-Web
ports:
- "80:80"
networks:
- havana
volumes:
- ./tools:/havana-web/bin/tools
environment:
<<: *havana-variables
restart: on-failure
mariadb:
image: "mariadb:latest"
ports:
- "3306:3306"
networks:
- havana
environment:
<<: *mariadb-variables
volumes:
- data:/var/lib/mysql
- ./tools/havana.sql:/docker-entrypoint-initdb.d/havana.sql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
restart: on-failure
volumes:
data:
networks:
havana: