Update docker-compose configuration for payment service images and resource limits
This commit is contained in:
parent
b233069ffb
commit
d03456bd6a
@ -2,7 +2,7 @@ services:
|
||||
api1:
|
||||
container_name: api1
|
||||
hostname: api1
|
||||
image: payment2:latest
|
||||
image: payment3:latest
|
||||
networks:
|
||||
- backend
|
||||
- payment-processor
|
||||
@ -12,18 +12,14 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.30"
|
||||
memory: "80MB"
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://api1:9999" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
cpus: "0.35"
|
||||
memory: "90MB"
|
||||
|
||||
|
||||
api2:
|
||||
container_name: api2
|
||||
hostname: api2
|
||||
image: payment2:latest
|
||||
image: payment3:latest
|
||||
depends_on:
|
||||
- redis
|
||||
- database
|
||||
@ -33,13 +29,9 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.30"
|
||||
memory: "80MB"
|
||||
healthcheck:
|
||||
test: [ "CMD", "curl", "-f", "http://api2:9999" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
cpus: "0.35"
|
||||
memory: "90MB"
|
||||
|
||||
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
@ -73,8 +65,8 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.10"
|
||||
memory: "48MB"
|
||||
cpus: "0.20"
|
||||
memory: "70MB"
|
||||
|
||||
database:
|
||||
container_name: database
|
||||
@ -83,11 +75,6 @@ services:
|
||||
platform: linux/amd64
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U postgres -d payment" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
environment:
|
||||
- POSTGRES_DB=payment
|
||||
- POSTGRES_USER=postgres
|
||||
@ -100,8 +87,8 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.70"
|
||||
memory: "117MB"
|
||||
cpus: "0.50"
|
||||
memory: "90MB"
|
||||
|
||||
networks:
|
||||
backend:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user