-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.infra.yml
More file actions
84 lines (78 loc) · 1.97 KB
/
Copy pathdocker-compose.infra.yml
File metadata and controls
84 lines (78 loc) · 1.97 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
# Infrastructure services for hybrid development
# Use this when running backend + frontend locally but need supporting services
# Run: docker compose -f docker-compose.infra.yml up -d
services:
db:
image: postgres:18-alpine
restart: always
env_file: ".env"
volumes:
- postgres-data-infra:/var/lib/postgresql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_INITDB_ARGS=--locale=C --encoding=UTF8
redis:
image: redis:alpine
restart: always
ports:
- "6379:6379"
volumes:
- redis-data-infra:/data
dramatiq_worker:
container_name: dramatiq_worker_infra
build:
context: .
dockerfile: backend/Dockerfile
restart: always
env_file: ".env"
environment:
- POSTGRES_SERVER=db
- REDIS_HOST=redis
- RUSTFS_HOSTNAME=rustfs
- SMTP_HOST=mailpit
- OLLAMA_BASE_URL=http://ollama:11434/v1
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
rustfs:
condition: service_started
working_dir: /app
command:
[
"sh",
"-c",
"uv run periodiq app.core.dramatiq app.api.tasks & PERIODIQ_PID=$!; uv run dramatiq app.api.tasks & DRAMATIQ_PID=$!; wait -n; kill $PERIODIQ_PID $DRAMATIQ_PID 2>/dev/null; wait",
]
rustfs:
image: rustfs/rustfs:latest
container_name: rustfs_infra
env_file:
- .env
ports:
- "9002:9000"
- "9003:9001"
volumes:
- rustfs_data_infra:/data
mailpit:
image: axllent/mailpit:latest
container_name: mailpit
restart: always
ports:
- "1025:1025"
- "8025:8025"
environment:
MP_MAX_MESSAGES: 5000
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
volumes:
postgres-data-infra:
redis-data-infra:
rustfs_data_infra: