-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (35 loc) · 925 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (35 loc) · 925 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
40
version: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
args: # Enables hot reloading
- uvicorn_extras=--reload --use-colors --log-level debug
env_file:
- ".env"
depends_on:
database:
condition: service_healthy
ports:
- "8000:80"
volumes: # mount the source code as a volume, so we can use hot reloading
- "./app:/app/app:ro"
- "./prisma:/app/prisma:ro"
database:
image: "postgres:${POSTGRES_VERSION:-15-alpine}"
volumes:
- postgres_data:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 2s
timeout: 1s
retries: 5
ports:
- "127.0.0.1:5432:5432"
environment:
- "POSTGRES_HOST=${POSTGRES_HOST}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_USER=${POSTGRES_USER}"
volumes:
postgres_data: