-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (65 loc) · 1.4 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
64
65
66
67
version: '3'
services:
#Tiny id Service
tinyid:
build:
context: .
dockerfile: Dockerfile
image: tinyid
container_name: tinyid
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./config/conf.toml:/opt/tinyid/config/conf.toml
networks:
- tinyid-network
depends_on:
- "tinyid_db_1"
- "tinyid_db_2"
#Mysql Service 1
tinyid_db_1:
image: mysql:5.7.22
container_name: tinyid_db_1
restart: unless-stopped
ports:
- "31000:31000"
volumes:
- tinyid-db-1:/var/lib/mysql
- ./sql/db1:/docker-entrypoint-initdb.d/:ro
environment:
MYSQL_DATABASE: tinyid
MYSQL_ROOT_PASSWORD: root123
MYSQL_USER: tinyid
MYSQL_PASSWORD: tinyid123
MYSQL_TCP_PORT: 31000
networks:
- tinyid-network
#Mysql Service 2
tinyid_db_2:
image: mysql:5.7.22
container_name: tinyid_db_2
restart: unless-stopped
ports:
- "31001:31001"
volumes:
- tinyid-db-2:/var/lib/mysql
- ./sql/db2:/docker-entrypoint-initdb.d/:ro
environment:
MYSQL_DATABASE: tinyid
MYSQL_ROOT_PASSWORD: root123
MYSQL_USER: tinyid
MYSQL_PASSWORD: tinyid123
MYSQL_TCP_PORT: 31001
networks:
- tinyid-network
#Docker Networks
networks:
tinyid-network:
driver: bridge
#Volumes
volumes:
tinyid-db-1:
driver: local
tinyid-db-2:
driver: local