-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
38 lines (36 loc) · 883 Bytes
/
Copy pathdocker-compose.yaml
File metadata and controls
38 lines (36 loc) · 883 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
version: '3.9'
services:
web:
container_name: data-api
build:
context: .
dockerfile: Dockerfile
command: ["./scripts/entrypoint.sh"]
env_file:
- .env
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- ./app:/app
- ./scripts:/scripts
- ./tests:/tests
db:
container_name: data-api-db
image: postgres:15.3-alpine
ports:
- "40000:5432"
environment:
POSTGRES_USER: ${DATABASE_USER:-postgres}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-postgres}
POSTGRES_DB: ${DATABASE_NAME:-postgres}
PGDATA: /var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "pg_isready", "-U", "${DATABASE_USER:-postgres}"]
interval: 2s
timeout: 4s
retries: 3
volumes:
- ./.pgdata:/var/lib/postgresql/data/pgdata