-
Notifications
You must be signed in to change notification settings - Fork 46
/
databases.yml
66 lines (65 loc) · 1.84 KB
/
databases.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
version: '3.8'
services:
mysql:
image: mysql:latest
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
ports:
- '3307:3306'
postgres:
image: postgres:latest
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- '5433:5432'
mongos:
image: mongo:latest
ports:
- '27018:27017'
# mongo1:
# image: mongo:latest
# command: ["--replSet", "rs0", "--bind_ip_all", "--port", "27020"]
# ports:
# - 27020:27020
# extra_hosts:
# - "host.docker.internal:host-gateway"
# healthcheck:
# test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'host.docker.internal:27020',priority:1}]}) }" | mongosh --port 27020 --quiet
# #test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'host.docker.internal:27020',priority:1},{_id:1,host:'host.docker.internal:27021',priority:0.5},{_id:2,host:'host.docker.internal:27022',priority:0.5}]}) }" | mongosh --port 27020 --quiet
# interval: 5s
# timeout: 30s
# start_period: 0s
# retries: 30
# volumes:
# - "mongo1_data:/data/db"
# - "mongo1_config:/data/configdb"
#
# mongo2:
# image: mongo:latest
# command: ["--replSet", "rs1", "--bind_ip_all", "--port", "27018"]
# ports:
# - 27021:27021
# extra_hosts:
# - "host.docker.internal:host-gateway"
# volumes:
# - "mongo2_data:/data/db"
# - "mongo2_config:/data/configdb"
#
# mongo3:
# image: mongo:latest
# command: ["--replSet", "rs1", "--bind_ip_all", "--port", "27019"]
# ports:
# - 27022:27022
# extra_hosts:
# - "host.docker.internal:host-gateway"
# volumes:
# - "mongo3_data:/data/db"
# - "mongo3_config:/data/configdb"
#
#volumes:
# mongo1_data:
# mongo2_data:
# mongo3_data:
# mongo1_config:
# mongo2_config:
# mongo3_config: