-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (32 loc) · 920 Bytes
/
docker-compose.yml
File metadata and controls
33 lines (32 loc) · 920 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: talk_to_data
POSTGRES_PASSWORD: talk_to_data
POSTGRES_DB: talk_to_data
ports:
- "5432:5432"
volumes:
# Bind-mount to host so DB survives container removal and `docker compose down`.
# $HOME expands to the host user's home directory.
- ${HOME}/.datahub/analytics-agent/postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U talk_to_data"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8100:8100"
env_file: .env
environment:
DATABASE_URL: postgresql+asyncpg://talk_to_data:talk_to_data@postgres:5432/talk_to_data
depends_on:
postgres:
condition: service_healthy
volumes:
- ./config.yaml:/app/config.yaml:ro