-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-multi.yml
83 lines (76 loc) · 2.08 KB
/
docker-compose-multi.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
81
82
83
services:
postgres:
image: postgres:alpine
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready --dbname=$${POSTGRES_DB} --username=$${POSTGRES_USER}'"]
interval: 3s
timeout: 30s
retries: 10
environment:
POSTGRES_DB: my_db
POSTGRES_USER: my_user
POSTGRES_PASSWORD: my_pass
# volumes:
# - postgres-data:/var/lib/postgresql/data
restart: unless-stopped
postgres2:
image: postgres:alpine
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready --dbname=$${POSTGRES_DB} --username=$${POSTGRES_USER}'"]
interval: 3s
timeout: 30s
retries: 10
environment:
POSTGRES_DB: my_db2
POSTGRES_USER: my_user2
POSTGRES_PASSWORD: my_pass2
# volumes:
# - postgres-data2:/var/lib/postgresql/data
restart: unless-stopped
postgres3:
image: postgres:alpine
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready --dbname=$${POSTGRES_DB} --username=$${POSTGRES_USER}'"]
interval: 3s
timeout: 30s
retries: 10
environment:
POSTGRES_DB: my_db3
POSTGRES_USER: my_user3
POSTGRES_PASSWORD: my_pass3
# volumes:
# - postgres-data3:/var/lib/postgresql/data
restart: unless-stopped
pgadmin4:
build: ./
image: dcagatay/pwless-pgadmin4:latest
depends_on:
postgres:
condition: service_healthy
postgres2:
condition: service_healthy
postgres3:
condition: service_healthy
ports:
- 25432:80
environment:
POSTGRES_USER_1: my_user
POSTGRES_PASSWORD_1: my_pass
# POSTGRES_HOST_1: "postgres"
# POSTGRES_PORT_1: "5432"
# POSTGRES_DB_1: "*"
POSTGRES_USER_2: my_user2
POSTGRES_PASSWORD_2: my_pass2
POSTGRES_HOST_2: "postgres2"
# POSTGRES_PORT_2: "5432"
# POSTGRES_DB_2: "*"
POSTGRES_USER_3: my_user3
POSTGRES_PASSWORD_3: my_pass3
POSTGRES_HOST_3: "postgres3"
# POSTGRES_PORT_3: "5432"
# POSTGRES_DB_3: "*"
restart: unless-stopped
# volumes:
# postgres-data:
# postgres-data2:
# postgres-data3: