-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (110 loc) · 2.8 KB
/
docker-compose.yml
File metadata and controls
118 lines (110 loc) · 2.8 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
services:
frontend:
build: ./frontend
container_name: frontend
ports:
- "5000:5000"
environment:
- API_GATEWAY_URL=http://api-gateway:8000
depends_on:
- api-gateway
api-gateway:
build: ./api-gateway
container_name: api-gateway
ports:
- "8000:8000"
depends_on:
- auth-service
# Aquí puedes agregar los otros servicios base
# Microservicio de Autenticación
auth-service:
build: ./services/authentication
container_name: auth-service
ports:
- "8001:8001"
environment:
- DATABASE_URL=mongodb://auth-db:27017/auth_db
depends_on:
- auth-db
# Base de datos para el servicio de autenticación
auth-db:
image: mongo:latest
container_name: auth-db
ports:
- "27017:27017"
volumes:
- auth_data:/data/db
# Microservicio de Métricas
metrics-service:
build: ./services/metrics
container_name: metrics-service
ports:
- "8002:8002"
environment:
- DATABASE_URL=${METRICS_DATABASE_URL}
depends_on:
metrics-db:
condition: service_healthy
# Base de datos para el Microservicio de Métricas
metrics-db:
image: postgres
container_name: metrics-db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d metrics_db"]
interval: 2s
retries: 10
ports:
- "5432:5432"
volumes:
- metrics_data:/var/lib/postgresql/data
volumes:
auth_data:
metrics_data:
analisis_data:
alerts_data:
# Microservicio de Análisis
# analisis-service:
# build: ./services/analisis
# container_name: analisis-service
# ports:
# - "8002:8002"
# environment:
# - DATABASE_URL=postgresql://user:password@analisis-db:5432/analisis_db
# depends_on:
# - analisis-db
# # Base de datos para el Microservicio de Análisis
# analisis-db:
# image: postgres
# container_name: analisis-db
# environment:
# - POSTGRES_USER=user
# - POSTGRES_PASSWORD=password
# - POSTGRES_DB=analisis_db
# ports:
# - "5432:5432"
# volumes:
# - analisis_data:/var/lib/postgresql/data
# # Microservicio de Alertas
# alerts-service:
# build: ./services/alerts
# container_name: alerts-service
# ports:
# - "8002:8002"
# environment:
# - DATABASE_URL=postgresql://user:password@alerts-db:5432/alertas_db
# depends_on:
# - alerts-db
# # Base de datos para el Microservicio de Alertas
# alerts-db:
# image: postgres
# container_name: alerts-db
# environment:
# - REDIS_PASSWORD=password
# ports:
# - "6379:6379"
# volumes:
# - alertas_data:/var/lib/postgresql/data