-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 904 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 904 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
41
42
43
services:
db:
image: postgres:16-alpine
container_name: whatflix-db
environment:
POSTGRES_DB: whatflix
POSTGRES_USER: whatflix
POSTGRES_PASSWORD: whatflix
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./src/db/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U whatflix -d whatflix"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: .
dockerfile: Dockerfile
container_name: whatflix-api
env_file:
- ./.env
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- ./src:/app/src
# tunnel:
# image: cloudflare/cloudflared:latest
# restart: always
# command: tunnel run
# env_file:
# - .env
volumes:
postgres_data: