-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
61 lines (57 loc) · 1.42 KB
/
compose.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
x-app: &default-app
build:
context: "."
args:
UID: "${UID:-1000}"
GID: "${GID:-1000}"
NODE_ENV: "${NODE_ENV:-production}"
UV_INSTALL_DEV: "${UV_INSTALL_DEV:-false}"
DJANGO_DEBUG: "${DJANGO_DEBUG:-false}"
depends_on:
db:
condition: service_started
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
tty: true
volumes:
- "./src:/app/src:z"
develop:
watch:
- action: rebuild
path: ./pyproject.toml
- action: rebuild
path: ./uv.lock
env_file:
- ".env"
services:
app:
<<: [*default-app]
ports:
- "8000:8000"
command: ["granian", "--interface", "asginl", "config.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--reload"]
healthcheck:
test: "${DOCKER_APP_HEALTHCHECK_TEST:-curl localhost:8000/health}"
interval: "60s"
timeout: "3s"
start_period: "5s"
retries: 3
db:
image: postgres:17
environment:
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_HOST_AUTH_METHOD: "trust"
ports:
- "5432:5432"
volumes:
- "db:/var/lib/postgresql/data"
- .:/src:cache
restart: unless-stopped
stop_grace_period: "3s"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
db: {}