-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 1.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (67 loc) · 1.81 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
services:
db:
image: postgres:17
environment:
POSTGRES_DB: datamailer
POSTGRES_USER: datamailer_user
POSTGRES_PASSWORD: datamailer_password
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U datamailer_user -d datamailer"]
interval: 5s
timeout: 5s
retries: 5
web:
build: .
ports:
- "8001:8000"
environment:
DATABASE_URL: postgresql://datamailer_user:datamailer_password@db:5432/datamailer
DEBUG: "1"
SECRET_KEY: dev-secret-key-change-in-production
ALLOWED_HOSTS: localhost,127.0.0.1,web,datamailer-web
CSRF_TRUSTED_ORIGINS: http://localhost:8001,http://127.0.0.1:8001
PUBLIC_BASE_URL: http://localhost:8001
DATAMAILER_API_DOCS_BASE_URL: http://localhost:8001
EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend
depends_on:
db:
condition: service_healthy
command:
- sh
- -c
- |
uv run python manage.py migrate
uv run python manage.py seed_demo_data
uv run python manage.py runserver 0.0.0.0:8000
healthcheck:
test:
[
"CMD",
"uv",
"run",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health/', timeout=2).read()",
]
interval: 5s
timeout: 5s
retries: 20
localstack:
image: localstack/localstack:4.4.0
profiles: ["aws-local"]
ports:
- "4566:4566"
environment:
SERVICES: sqs
ACTIVATE_PRO: "0"
AWS_DEFAULT_REGION: us-east-1
DEBUG: "0"
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:4566/_localstack/health"]
interval: 5s
timeout: 3s
retries: 20
volumes:
postgres_data: