-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathcompose.yml
More file actions
90 lines (83 loc) · 2.14 KB
/
compose.yml
File metadata and controls
90 lines (83 loc) · 2.14 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
x-common-settings: &common-settings
build:
context: .
dockerfile: Dockerfile
target: release
depends_on:
db:
condition: service_healthy
environment:
- "ALLOWED_HOSTS=*"
- "DATABASE_URL=postgres://postgres@db/postgres"
- "DJANGO_DEBUG=true"
# Keep the project venv OUT of /src so the host bind-mount below can't
# shadow it. Otherwise `uv run` rebuilds the venv on every invocation.
- "UV_PROJECT_ENVIRONMENT=/opt/venv"
env_file: .env
tty: true
volumes:
- .:/src:cache
- django-tailwind-cli-data:/src/.django_tailwind_cli
services:
db:
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
healthcheck:
# CMD-SHELL takes a single command string; passing args as extra list
# items silently drops them. Use the full command as one string.
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres -q"]
# `start_interval` (Docker 25+) lets us poll aggressively during boot
# and relax once the container is healthy.
interval: 30s
start_interval: 1s
start_period: 20s
timeout: 3s
retries: 5
image: "pgautoupgrade/pgautoupgrade:17-alpine"
init: true
user: postgres
volumes:
- .:/src:cache
- postgres-data:/var/lib/postgresql/data/
worker:
<<: *common-settings
command: ["/src/start-worker.sh"]
healthcheck:
test: ["CMD-SHELL", "/src/healthcheck-worker.sh"]
interval: 30s
start_interval: 3s
start_period: 60s
timeout: 10s
retries: 3
init: true
tailwind:
<<: *common-settings
command: ["/src/start-tailwind.sh"]
init: true
utility:
<<: *common-settings
command: [
"uv",
"run",
"--no-sync",
"-m",
"manage",
"--version"
]
entrypoint: ["/src/compose-entrypoint.sh"]
web:
<<: *common-settings
command: ["/src/start-dev.sh"]
healthcheck:
test: ["CMD-SHELL", "/src/healthcheck-web.sh"]
interval: 30s
start_interval: 2s
start_period: 60s
timeout: 5s
retries: 3
init: true
ports:
- "8000:8000"
volumes:
django-tailwind-cli-data:
postgres-data: