-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
39 lines (36 loc) · 861 Bytes
/
docker-compose.yaml
File metadata and controls
39 lines (36 loc) · 861 Bytes
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
services:
postgres:
image: postgres:16-alpine
env_file:
- .env
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'" ]
interval: 5s
timeout: 3s
retries: 3
networks:
- internal
api:
env_file:
- .env
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- DB_SOURCE=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_DRIVER}:5432/${POSTGRES_DB}?sslmode=disable
depends_on:
postgres:
condition: service_healthy
restart: true
required: true
entrypoint: ["/app/main"]
networks:
- internal
networks:
internal: