-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (58 loc) · 1.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
version: "3.8"
services:
club-portal:
build: .
image: club-portal
container_name: club-portal
ports:
- "127.0.0.1:8080:8080"
volumes:
- ./images:/root/images
- ./thumbnails:/root/thumbnails
networks:
- redis-network
- mariadb-network
secrets:
- config
depends_on:
redis:
condition: service_started
mariadb:
condition: service_healthy
redis:
image: redis:alpine
container_name: redis
networks:
- redis-network
mariadb:
image: mariadb:10
container_name: mariadb
ports:
- "127.0.0.1:3306:3306"
volumes:
- ./cfg/mariadb/conf:/etc/mysql/conf.d
- ./cfg/mariadb/sql:/docker-entrypoint-initdb.d
- ./cfg/mariadb/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_pass
MYSQL_DATABASE: club_portal
networks:
- mariadb-network
secrets:
- db_pass
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
redis-network:
driver: bridge
mariadb-network:
driver: bridge
secrets:
config:
file: ./cfg/config.toml
db_pass:
file: ./cfg/db_pass