-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
56 lines (51 loc) · 1.31 KB
/
docker-compose.yaml
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
services:
postgres-svc:
image: postgres-img:1.0.0
container_name: postgres-container
ports:
- "5432:5432"
environment:
- POSTGRES_USER=$DB_USER
- POSTGRES_PASSWORD=$DB_PASS
- POSTGRES_DB=$POSTGRES_DB
volumes:
- ./postgres-data:/var/lib/postgresql/data
networks:
cart-network:
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
cart-api-svc:
image: cart-api:1.0.0
container_name: cart-api-container
environment:
- API_LABEL=$API_LABEL
- API_VERSION=$API_VERSION
- API_PORT=$API_PORT
- API_READ_TIMEOUT=$API_READ_TIMEOUT
- API_STAGE_STATUS=$API_STAGE_STATUS
- DB_HOST=$DB_HOST
- DB_PORT=$DB_PORT
- DB_DB=$DB_DB
- DB_SCHEMA=$DB_SCHEMA
- DB_USER=$DB_USER
- DB_PASS=$DB_PASS
- DB_MAX_CONNECTIONS=$DB_MAX_CONNECTIONS
- DB_MAX_IDLE_CONNECTIONS=$DB_MAX_IDLE_CONNECTIONS
- DB_MAX_LIFETIME_CONNECTIONS=$DB_MAX_LIFETIME_CONNECTIONS
- DB_SSL_MODE=$DB_SSL_MODE
- GIVEN_AMOUNT=$GIVEN_AMOUNT
ports:
- 0.0.0.0:$API_PORT:$API_PORT
depends_on:
postgres-svc:
condition: service_healthy
networks:
cart-network:
volumes:
postgres-data:
networks:
cart-network:
driver: bridge