-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.48 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
services:
# Postgres + Redis now come from the shared ../dev-services stack
# (one PostGIS + one Redis on the external `devnet` network). Start it first
# with `make up` in ~/Repos/dev-services. This project uses:
# database: simple_module_python (on shared postgres:5432, postgres/postgres)
# redis: DB 4 (broker) / DB 5 (result backend)
worker:
build:
context: .
dockerfile: docker/worker.Dockerfile
env_file: .env
environment:
SM_BG_TASKS_BROKER_URL: redis://redis:6379/4
SM_BG_TASKS_RESULT_BACKEND: redis://redis:6379/5
SM_DATABASE_URL: ${SM_DATABASE_URL:-postgresql+asyncpg://postgres:postgres@postgres:5432/simple_module_python}
networks: [devnet]
command:
- "uv"
- "run"
- "celery"
- "-A"
- "scripts.run_worker:celery"
- "worker"
- "-l"
- "info"
- "--concurrency=4"
beat:
build:
context: .
dockerfile: docker/worker.Dockerfile
env_file: .env
environment:
SM_BG_TASKS_BROKER_URL: redis://redis:6379/4
SM_BG_TASKS_RESULT_BACKEND: redis://redis:6379/5
SM_DATABASE_URL: ${SM_DATABASE_URL:-postgresql+asyncpg://postgres:postgres@postgres:5432/simple_module_python}
depends_on:
worker:
condition: service_started
networks: [devnet]
command:
- "uv"
- "run"
- "celery"
- "-A"
- "scripts.run_worker:celery"
- "beat"
- "-l"
- "info"
networks:
devnet:
external: true