-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
44 lines (41 loc) · 1.09 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
version: '3'
# usage:
# (sudo) docker-compose up -d
# (sudo) docker-compose down
services:
mariadb:
container_name: mariadb
image: mariadb:latest
restart: 'always'
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=chanjo4_test
- MYSQL_USER=chanjoUser
- MYSQL_PASSWORD=chanjoPassword
healthcheck: # Wait for the service to be ready before accepting incoming connections
test: "mysql --user=chanjoUser --password=chanjoPassword --execute \"SHOW DATABASES;\""
timeout: 10s
retries: 20
volumes:
- mysqldata:/home/worker/data/database
networks:
- chanjo-net
chanjo-cli:
container_name: chanjo-cli
build:
context: .
dockerfile: Dockerfile
depends_on:
mariadb:
condition: service_healthy # DB_URI=mysql+pymysql://chanjoUser:chanjoPassword@mariadb/chanjo4_test
networks:
- chanjo-net
volumes:
mysqldata:
networks:
chanjo-net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.21.0.0/24