2025-04-25 05:15:40 +08:00
|
|
|
services:
|
|
|
|
api:
|
2025-05-28 00:21:11 +08:00
|
|
|
image: ghcr.io/suna-ai/suna-backend:latest
|
2025-06-25 01:06:25 +08:00
|
|
|
platform: linux/amd64
|
2025-04-25 05:15:40 +08:00
|
|
|
build:
|
|
|
|
context: .
|
2025-04-25 06:04:59 +08:00
|
|
|
dockerfile: Dockerfile
|
2025-04-25 05:15:40 +08:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
volumes:
|
|
|
|
- .:/app
|
2025-06-16 01:43:21 +08:00
|
|
|
- /app/.venv
|
2025-04-28 05:21:59 +08:00
|
|
|
- ./logs:/app/logs
|
2025-04-25 05:15:40 +08:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
2025-05-15 14:29:27 +08:00
|
|
|
rabbitmq:
|
|
|
|
condition: service_healthy
|
2025-04-25 05:15:40 +08:00
|
|
|
networks:
|
|
|
|
- app-network
|
|
|
|
environment:
|
|
|
|
- REDIS_HOST=redis
|
|
|
|
- REDIS_PORT=6379
|
|
|
|
- REDIS_PASSWORD=
|
2025-04-28 05:21:59 +08:00
|
|
|
- LOG_LEVEL=INFO
|
2025-05-15 14:29:27 +08:00
|
|
|
- RABBITMQ_HOST=rabbitmq
|
|
|
|
- RABBITMQ_PORT=5672
|
2025-04-28 05:21:59 +08:00
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "10m"
|
|
|
|
max-file: "3"
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
|
|
|
start_period: 40s
|
2025-04-25 05:15:40 +08:00
|
|
|
|
2025-05-28 00:21:11 +08:00
|
|
|
worker:
|
2025-06-25 01:06:25 +08:00
|
|
|
image: ghcr.io/suna-ai/suna-backend:latest
|
|
|
|
platform: linux/amd64
|
2025-05-15 14:29:27 +08:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
2025-06-23 22:38:01 +08:00
|
|
|
command: uv run dramatiq --skip-logging --processes 4 --threads 4 run_agent_background
|
2025-05-15 14:29:27 +08:00
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
volumes:
|
|
|
|
- .:/app
|
2025-06-16 01:43:21 +08:00
|
|
|
- /app/.venv
|
2025-05-28 00:21:11 +08:00
|
|
|
- ./worker-logs:/app/logs
|
2025-05-15 14:29:27 +08:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
|
|
|
rabbitmq:
|
|
|
|
condition: service_healthy
|
|
|
|
networks:
|
|
|
|
- app-network
|
|
|
|
environment:
|
|
|
|
- REDIS_HOST=redis
|
|
|
|
- REDIS_PORT=6379
|
|
|
|
- REDIS_PASSWORD=
|
|
|
|
- LOG_LEVEL=INFO
|
|
|
|
- RABBITMQ_HOST=rabbitmq
|
|
|
|
- RABBITMQ_PORT=5672
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "10m"
|
|
|
|
max-file: "3"
|
2025-06-29 03:33:42 +08:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "uv", "run", "worker_health.py"]
|
|
|
|
timeout: 10s
|
|
|
|
interval: 30s
|
|
|
|
start_period: 40s
|
2025-05-15 14:29:27 +08:00
|
|
|
|
2025-04-25 05:15:40 +08:00
|
|
|
redis:
|
2025-06-29 03:33:42 +08:00
|
|
|
image: redis:8-alpine
|
2025-05-28 00:21:11 +08:00
|
|
|
# ports:
|
|
|
|
# - "127.0.0.1:6379:6379"
|
2025-04-25 05:15:40 +08:00
|
|
|
volumes:
|
|
|
|
- redis_data:/data
|
2025-05-19 07:46:08 +08:00
|
|
|
- ./services/docker/redis.conf:/usr/local/etc/redis/redis.conf:ro
|
2025-04-25 05:15:40 +08:00
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- app-network
|
2025-05-19 07:46:08 +08:00
|
|
|
command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes --bind 0.0.0.0 --protected-mode no --maxmemory 8gb --maxmemory-policy allkeys-lru
|
2025-04-25 05:15:40 +08:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
2025-04-28 05:21:59 +08:00
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 10s
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "10m"
|
|
|
|
max-file: "3"
|
2025-04-25 05:15:40 +08:00
|
|
|
|
2025-05-14 20:48:02 +08:00
|
|
|
rabbitmq:
|
|
|
|
image: rabbitmq
|
2025-05-28 00:21:11 +08:00
|
|
|
# ports:
|
|
|
|
# - "127.0.0.1:5672:5672"
|
2025-05-15 14:29:27 +08:00
|
|
|
volumes:
|
|
|
|
- rabbitmq_data:/var/lib/rabbitmq
|
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- app-network
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 10s
|
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "10m"
|
|
|
|
max-file: "3"
|
2025-05-14 20:48:02 +08:00
|
|
|
|
2025-04-25 05:15:40 +08:00
|
|
|
networks:
|
|
|
|
app-network:
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
volumes:
|
2025-05-14 20:48:02 +08:00
|
|
|
redis_data:
|
2025-05-15 14:29:27 +08:00
|
|
|
rabbitmq_data:
|