-
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.25 KB
/
docker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.25 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:
redis:
image: redis:7-alpine
container_name: foodbot_redis
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
api:
build: .
container_name: optifood_api
command: >
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
--proxy-headers --forwarded-allow-ips='*'
restart: always
env_file: .env
environment:
- REDIS_HOST=redis
ports:
- "127.0.0.1:8000:8000"
depends_on:
redis:
condition: service_healthy
volumes:
- .:/app # bind mount for hot-reload (dev only)
- media_data:/tmp/optifood_media
- ./logs:/app/logs
worker:
build: .
container_name: optifood_worker
command: taskiq worker app.worker.broker:broker app.worker.tasks --workers 1
restart: always
env_file: .env
environment:
- REDIS_HOST=redis
volumes:
- .:/app # bind mount for hot-reload (dev only)
- media_data:/tmp/optifood_media
- ./logs:/app/logs
depends_on:
redis:
condition: service_healthy
volumes:
redis_data:
media_data: