forked from microsoft/PartsUnlimitedMRP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.03 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
version: "3.9"
services:
# Servicio de MongoDB
mongo:
image: mariapicazo5/p2gps:db
deploy:
replicas: 1 # Escalabilidad del servicio
resources:
limits:
cpus: "0.15"
memory: 200M
restart_policy:
condition: on-failure # Reiniciar el contenedor si falla
ports:
- "28017:28017" # Mapeo de puertos
- "27017:27017"
volumes:
- "db-data:/data/db" # Persistencia de datos
# Servicio de Order
order:
image: mariapicazo5/p2gps:order
depends_on:
- mongo # Dependencia del servicio Mongo
deploy:
replicas: 1
resources:
limits:
cpus: "0.3"
memory: 500M
# restart_policy:
# condition: on-failure
ports:
- "8080:8080"
# Servicio web
web:
image: mariapicazo5/p2gps:web
deploy:
replicas: 1
resources:
limits:
cpus: "0.25"
memory: 300M
restart_policy:
condition: on-failure
ports:
- "80:8080"
volumes:
db-data: {}