-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
80 lines (75 loc) · 1.89 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
68
69
70
71
72
73
74
75
76
77
78
79
80
version: "3.8"
networks:
postgres-network:
external: true
volumes:
backup-volume:
services:
consul:
image: consul:1.15.2
networks:
postgres-network:
aliases:
- consul_cluster
environment:
- CONSUL_BIND_INTERFACE=eth0
command: agent -ui -data-dir /consul/data -server -client 0.0.0.0 -retry-join consul_cluster -bootstrap-expect=5
deploy:
replicas: 5
endpoint_mode: dnsrr
placement:
max_replicas_per_node: 1
update_config:
parallelism: 1
delay: 60s
restart_policy:
condition: on-failure
ports:
- target: 8500
published: 8500
protocol: tcp
mode: host
mysql:
image: ghcr.io/romaxa55/mysql-ha-swarm:1.0.0
networks:
postgres-network:
environment:
- CONSUL_BIND_INTERFACE=eth1
- CONSUL_BOOTSTRAP_SERVER=consul_cluster
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
- MINIO_URL=http://minio:9000
- MCM_BIND_INTERFACE=eth1
- MYSQL_ROOT_PASSWORD=verysecret123
- MYSQL_BACKUP_USER=backup_user
- MYSQL_BACKUP_PASSWORD=backup_secret
- MYSQL_REPLICATION_USER=replication_user
- MYSQL_REPLICATION_PASSWORD=replication_secret
- MYSQL_APPLICATION_USER=mysql_user
- MYSQL_APPLICATION_PASSWORD=mysql_secret
deploy:
replicas: 3
placement:
max_replicas_per_node: 1
update_config:
parallelism: 1
delay: 60s
restart_policy:
condition: on-failure
ports:
- 6032:6032
- 3306:6033
minio:
image: minio/minio:RELEASE.2023-05-04T21-44-30Z
networks:
postgres-network:
aliases:
- minio_endpoint
volumes:
- backup-volume:/data
ports:
- 9900:9000
environment:
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
command: server /data