-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
36 lines (34 loc) · 877 Bytes
/
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
services:
postgres:
container_name: time_tracker_db
image: postgres:16-alpine
ports:
- ${DB_PORT:-5432}:5432
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD="${DB_PASSWORD:-postgres}"
- POSTGRES_USER="${DB_USER:-postgres}"
- POSTGRES_DB="${DB_NAME:-time_tracker_db}"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-time_tracker_db}"]
interval: 5s
timeout: 5s
retries: 10
app:
container_name: time_tracker
build:
context: .
dockerfile: ./ci/Dockerfile
args:
- APP_PORT=${APP_PORT:-8000}
ports:
- ${APP_PORT:-8000}:${APP_PORT:-8000}
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
postgres-data: