-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
229 lines (218 loc) · 5.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
229 lines (218 loc) · 5.64 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
x-shared-environment: &shared-environment
DATABASE_URL: postgresql://${POSTGRES_USER:-reconny}:${POSTGRES_PASSWORD:-reconny123}@postgres:5432/${POSTGRES_DB:-reconny}
REDIS_URL: redis://redis:6379/0
CELERY_BROKER_URL: redis://redis:6379/1
CELERY_RESULT_BACKEND: redis://redis:6379/2
SECRET_KEY: ${SECRET_KEY:-super-secret-key-change-in-production}
OPENAI_API_KEY: ${OPENAI_API_KEY:-sk-your-key-here}
AI_BASE_URL: ${AI_BASE_URL:-https://api.opencode.dev/v1}
AI_MODEL: ${AI_MODEL:-deepseek-v4-flash-free}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
LOG_FORMAT: ${LOG_FORMAT:-json}
ENVIRONMENT: ${ENVIRONMENT:-development}
CORS_ORIGINS: ${CORS_ORIGINS:-["http://localhost:3000","http://localhost:8000","http://localhost"]}
SUBFINDER_PATH: /usr/local/bin/subfinder
HTTPX_PATH: /usr/local/bin/httpx
KATANA_PATH: /usr/local/bin/katana
NUCLEI_PATH: /usr/local/bin/nuclei
GAU_PATH: /usr/local/bin/gau
STORAGE_PATH: /app/storage/jobs
services:
postgres:
image: postgres:15-alpine
container_name: reconny-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-reconny}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-reconny123}
POSTGRES_DB: ${POSTGRES_DB:-reconny}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- reconny
healthcheck:
test: ["CMD-SHELL", "pg_isready -U reconny"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: reconny-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- reconny
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
image: reconny-frontend
container_name: reconny-frontend
ports:
- "80:80"
depends_on:
- backend
networks:
- reconny
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
image: reconny-backend
container_name: reconny-backend
ports:
- "8000:8000"
environment: *shared-environment
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- storage_data:/app/storage
- log_data:/app/logs
networks:
- reconny
restart: unless-stopped
worker:
build:
context: ./backend
dockerfile: Dockerfile
image: reconny-worker
container_name: reconny-worker
environment: *shared-environment
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- storage_data:/app/storage
- log_data:/app/logs
networks:
- reconny
command: >
celery -A app.tasks.celery_app worker
--loglevel=info
--concurrency=4
--queues=pipeline,stages,ai
--max-tasks-per-child=100
--prefetch-multiplier=1
--without-gossip
--without-mingle
healthcheck:
test: ["CMD-SHELL", "grep -q celery /proc/1/cmdline || exit 1"]
interval: 15s
timeout: 5s
start_period: 20s
retries: 3
restart: unless-stopped
worker-low:
build:
context: ./backend
dockerfile: Dockerfile
image: reconny-worker-low
container_name: reconny-worker-low
environment: *shared-environment
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- storage_data:/app/storage
- log_data:/app/logs
networks:
- reconny
command: >
celery -A app.tasks.celery_app worker
--loglevel=info
--concurrency=2
--queues=default
--max-tasks-per-child=50
--prefetch-multiplier=1
healthcheck:
test: ["CMD-SHELL", "grep -q celery /proc/1/cmdline || exit 1"]
interval: 15s
timeout: 5s
start_period: 20s
retries: 3
restart: unless-stopped
beat:
build:
context: ./backend
dockerfile: Dockerfile
image: reconny-beat
container_name: reconny-beat
environment: *shared-environment
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- storage_data:/app/storage
- log_data:/app/logs
networks:
- reconny
command: >
bash -c "rm -f /tmp/celerybeat.pid && exec celery -A app.tasks.celery_app beat
--loglevel=info
--pidfile=/tmp/celerybeat.pid"
healthcheck:
test: ["CMD-SHELL", "grep -q celery /proc/1/cmdline || exit 1"]
interval: 15s
timeout: 5s
start_period: 20s
retries: 3
restart: unless-stopped
flower:
image: mher/flower:2.0
container_name: reconny-flower
environment:
CELERY_BROKER_URL: redis://redis:6379/1
CELERY_RESULT_BACKEND: redis://redis:6379/2
FLOWER_PORT: 5555
FLOWER_BASIC_AUTH: ${FLOWER_USER:-admin}:${FLOWER_PASSWORD:-admin123}
expose:
- "5555"
depends_on:
redis:
condition: service_healthy
networks:
- reconny
restart: unless-stopped
migration:
build:
context: ./backend
dockerfile: Dockerfile
image: reconny-migration
container_name: reconny-migration
environment: *shared-environment
depends_on:
postgres:
condition: service_healthy
volumes:
- ./backend/alembic:/app/alembic
networks:
- reconny
command: >
sh -c "alembic upgrade head && echo 'Migrations completed'"
restart: no
networks:
reconny:
driver: bridge
volumes:
postgres_data:
redis_data:
storage_data:
log_data: