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