sam12345324 commited on
Commit
25aa2d3
·
verified ·
1 Parent(s): 139da96

Create docker-compose.yml

Browse files
Files changed (1) hide show
  1. docker-compose.yml +122 -0
docker-compose.yml ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ api:
3
+ image: ghcr.io/suna-ai/suna-backend:latest
4
+ build:
5
+ context: .
6
+ dockerfile: Dockerfile
7
+ ports:
8
+ - "8000:8000"
9
+ env_file:
10
+ - .env
11
+ volumes:
12
+ - .:/app
13
+ - ./logs:/app/logs
14
+ restart: unless-stopped
15
+ depends_on:
16
+ redis:
17
+ condition: service_healthy
18
+ rabbitmq:
19
+ condition: service_healthy
20
+ networks:
21
+ - app-network
22
+ environment:
23
+ - REDIS_HOST=redis
24
+ - REDIS_PORT=6379
25
+ - REDIS_PASSWORD=
26
+ - LOG_LEVEL=INFO
27
+ - RABBITMQ_HOST=rabbitmq
28
+ - RABBITMQ_PORT=5672
29
+ logging:
30
+ driver: "json-file"
31
+ options:
32
+ max-size: "10m"
33
+ max-file: "3"
34
+ healthcheck:
35
+ test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
36
+ interval: 30s
37
+ timeout: 10s
38
+ retries: 3
39
+ start_period: 40s
40
+
41
+ worker:
42
+ build:
43
+ context: .
44
+ dockerfile: Dockerfile
45
+ command: python -m dramatiq --processes 4 --threads 4 run_agent_background
46
+ env_file:
47
+ - .env
48
+ volumes:
49
+ - .:/app
50
+ - ./worker-logs:/app/logs
51
+ restart: unless-stopped
52
+ depends_on:
53
+ redis:
54
+ condition: service_healthy
55
+ rabbitmq:
56
+ condition: service_healthy
57
+ networks:
58
+ - app-network
59
+ environment:
60
+ - REDIS_HOST=redis
61
+ - REDIS_PORT=6379
62
+ - REDIS_PASSWORD=
63
+ - LOG_LEVEL=INFO
64
+ - RABBITMQ_HOST=rabbitmq
65
+ - RABBITMQ_PORT=5672
66
+ logging:
67
+ driver: "json-file"
68
+ options:
69
+ max-size: "10m"
70
+ max-file: "3"
71
+
72
+ redis:
73
+ image: redis:7-alpine
74
+ # ports:
75
+ # - "127.0.0.1:6379:6379"
76
+ volumes:
77
+ - redis_data:/data
78
+ - ./services/docker/redis.conf:/usr/local/etc/redis/redis.conf:ro
79
+ restart: unless-stopped
80
+ networks:
81
+ - app-network
82
+ 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
83
+ healthcheck:
84
+ test: ["CMD", "redis-cli", "ping"]
85
+ interval: 10s
86
+ timeout: 5s
87
+ retries: 5
88
+ start_period: 10s
89
+ logging:
90
+ driver: "json-file"
91
+ options:
92
+ max-size: "10m"
93
+ max-file: "3"
94
+
95
+ rabbitmq:
96
+ image: rabbitmq
97
+ # ports:
98
+ # - "127.0.0.1:5672:5672"
99
+ volumes:
100
+ - rabbitmq_data:/var/lib/rabbitmq
101
+ restart: unless-stopped
102
+ networks:
103
+ - app-network
104
+ healthcheck:
105
+ test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
106
+ interval: 10s
107
+ timeout: 5s
108
+ retries: 5
109
+ start_period: 10s
110
+ logging:
111
+ driver: "json-file"
112
+ options:
113
+ max-size: "10m"
114
+ max-file: "3"
115
+
116
+ networks:
117
+ app-network:
118
+ driver: bridge
119
+
120
+ volumes:
121
+ redis_data:
122
+ rabbitmq_data: