Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (80 loc) · 1.94 KB
/
Copy pathdocker-compose.yml
File metadata and controls
86 lines (80 loc) · 1.94 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
services:
backend:
build:
context: .
dockerfile: docker/backend.Dockerfile
ports:
- "8000:8000"
env_file:
- ./backend/.backend_env
depends_on:
- db
- redis
volumes:
- ./backend:/app
- backend-venv:/app/.venv
celery:
build:
context: .
dockerfile: docker/backend.Dockerfile
command: pdm run celery -A climateconnect_main worker -B -l INFO
env_file:
- ./backend/.backend_env
depends_on:
- db
- redis
- backend
volumes:
- ./backend:/app
- backend-venv:/app/.venv
# Dedicated worker for LocationIQ autocomplete lookups (location.tasks.fetch_autocomplete),
# isolated on its own queue so it never competes with the rest of the app's Celery
# workload for concurrency slots.
#
# This is ONE container / ONE `celery worker` process — no `replicas:`/`scale:` here,
# and it must stay that way (see the multi-process bug this design replaced in
# doc/spec/20260720_1400_locationiq_rate_limited_queue_design.md).
celery-lookup:
build:
context: .
dockerfile: docker/backend.Dockerfile
command: pdm run celery -A climateconnect_main worker -Q lookup -c 4 -l INFO
env_file:
- ./backend/.backend_env
depends_on:
- db
- redis
- backend
volumes:
- ./backend:/app
- backend-venv:/app/.venv
frontend:
build:
context: .
dockerfile: docker/frontend.Dockerfile
ports:
- "3000:3000"
env_file:
- ./frontend/.env
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules
db:
image: postgis/postgis:15-3.3
environment:
POSTGRES_PASSWORD: backend
POSTGRES_USER: backend
POSTGRES_DB: backend
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:7
ports:
- "6379:6379"
volumes:
postgres-data:
backend-venv: