-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (41 loc) · 926 Bytes
/
docker-compose.yml
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
version: '3.8'
services:
postgresdb:
image: postgres:bullseye
container_name: postgresdb
restart: always
ports:
- "5433:5432"
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_DB_NAME}
- POSTGRES_USER=${POSTGRES_DB_USER}
- POSTGRES_PASSWORD=${POSTGRES_DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- quotes-service-network
quotes-service:
container_name: quotes-service
restart: always
build:
context: ./quotes-service
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
postgresdb:
condition: service_healthy
networks:
- quotes-service-network
env_file:
- .env
volumes:
db-data: {}
networks:
quotes-service-network:
driver: bridge