-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (75 loc) · 1.79 KB
/
docker-compose.yml
File metadata and controls
80 lines (75 loc) · 1.79 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: '3.8'
services:
# Nodo Caracas
postgres-caracas:
image: postgres:15-alpine
container_name: bd-caracas
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- ./scripts/caracas/init.sql:/docker-entrypoint-initdb.d/init.sql
- caracas-data:/var/lib/postgresql/data
networks:
bd-network:
ipv4_address: 172.20.0.10
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# Nodo Valencia
postgres-valencia:
image: postgres:15-alpine
container_name: bd-valencia
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5433:5432"
volumes:
- ./scripts/valencia/init-distribuido.sql:/docker-entrypoint-initdb.d/init.sql
- valencia-data:/var/lib/postgresql/data
networks:
bd-network:
ipv4_address: 172.20.0.11
depends_on:
postgres-caracas:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# pgAdmin
pgadmin:
image: dpage/pgadmin4:latest
container_name: bd-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- "5050:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
networks:
- bd-network
depends_on:
- postgres-caracas
- postgres-valencia
networks:
bd-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
gateway: 172.20.0.1
volumes:
caracas-data:
valencia-data:
pgadmin-data: