-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (61 loc) · 1.34 KB
/
docker-compose.yml
File metadata and controls
66 lines (61 loc) · 1.34 KB
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
services:
mysql-primary:
image: mysql:8.0
container_name: mysql-primary
environment:
MYSQL_ROOT_PASSWORD: FCFM
MYSQL_DATABASE: appdb
MYSQL_USER: appuser
MYSQL_PASSWORD: apppass
TZ : America/Monterrey
ports:
- "3307:3306"
command:
- "--server-id=1"
- "--log-bin=mysql-bin"
- "--binlog-do-db=appdb"
volumes:
- db_primary_data:/var/lib/mysql
mysql-replica:
image: mysql:8.0
container_name: mysql-replica
environment:
MYSQL_ROOT_PASSWORD: FCFM
MYSQL_DATABASE: appdb
MYSQL_USER: appuser
MYSQL_PASSWORD: apppass
TZ : America/Monterrey
ports:
- "3308:3306"
command:
- "--server-id=2"
- "--relay-log=relay-bin"
- "--read-only=ON"
depends_on:
- mysql-primary
volumes:
- db_replica_data:/var/lib/mysql
db-watcher:
build: ./db-watcher
container_name: db-watcher
depends_on:
- mysql-primary
- mysql-replica
db-resync:
build: ./db-resync
container_name: db-resync
depends_on:
- mysql-primary
- mysql-replica
fastapi-dashboard:
build:
context: ./fastapi-dashboard
container_name: fastapi-dashboard
ports:
- "8000:8000"
depends_on:
- mysql-primary
- mysql-replica
volumes:
db_primary_data:
db_replica_data: