-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
222 lines (211 loc) · 5.21 KB
/
docker-compose.yml
File metadata and controls
222 lines (211 loc) · 5.21 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
services:
console:
container_name: console
image: oasm/oasm-console:latest
build:
context: ./console
dockerfile: Dockerfile
networks:
- oasm
env_file:
- ./console/.env
ports:
- '3000:80'
restart: 'always'
depends_on:
core-api:
condition: service_healthy
core-api:
container_name: oasm-api
image: oasm/oasm-api:latest
build:
context: ./core-api
dockerfile: Dockerfile
networks:
- oasm
env_file:
- ./core-api/.env
ports:
- '6276:6276'
environment:
- POSTGRES_HOST=postgres
- REDIS_URL=redis://:password@redis:6379/0
- GEO_IP_URL=geo-ip:4360
- OASM_CLOUD_APIKEY=change_me
restart: 'always'
depends_on:
migration:
condition: service_completed_successfully
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./.open-api:/.open-api
- api-storage:/app/.storage:rw
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:6276/api/health']
interval: 1s
timeout: 30s
retries: 10
oasm-worker:
image: oasm/oasm-worker:latest
build:
context: ./worker
dockerfile: Dockerfile
env_file:
- ./worker/.env
environment:
- API=http://core-api:6276/
- MAX_JOBS=10
- OASM_CLOUD_APIKEY=change_me
volumes:
- nuclei-templates:/root/nuclei-templates:rw
networks:
- oasm
restart: 'always'
depends_on:
core-api:
condition: service_healthy
postgres:
container_name: oasm-postgres
image: pgvector/pgvector:pg17
restart: always
env_file:
- ./core-api/.env
environment:
POSTGRES_USER: '${POSTGRES_USERNAME:-postgres}'
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-open_asm}
POSTGRES_HOST_AUTH_METHOD: trust
PGUSER: '${POSTGRES_USERNAME:-postgres}'
PGPASSWORD: '${POSTGRES_PASSWORD:-postgres}'
volumes:
- pgdata:/var/lib/postgresql/data:rw
ports:
- '${POSTGRES_PORT:-5432}:5432'
networks:
- oasm
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 1s
timeout: 5s
retries: 10
redis:
container_name: oasm-redis
image: redis:alpine
restart: always
ports:
- '6379:6379'
networks:
- oasm
volumes:
- redis-data:/data
command: 'redis-server --requirepass password'
healthcheck:
test: ['CMD', 'redis-cli', '-a', 'password', 'ping']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
cpus: '1'
memory: 1500M
reservations:
cpus: '0.5'
memory: 512M
geo-ip:
container_name: geo-ip
image: ghcr.io/l1ttps/geoip-proxy:latest
networks:
- oasm
ports:
- '4360:4360'
restart: 'always'
volumes:
- geoip-data:/app/data:rw
migration:
container_name: oasm-migration
image: oasm/oasm-api:latest
networks:
- oasm
env_file:
- ./core-api/.env
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USERNAME=${POSTGRES_USERNAME:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-open_asm}
restart: 'no'
depends_on:
postgres:
condition: service_healthy
command: >
sh -c "node node_modules/typeorm/cli.js migration:run -d dist/database/database-config.js"
assistant:
container_name: assistant
image: oasm/oasm-assistant:dev
restart: on-failure
env_file:
- ./core-api/.env
environment:
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_USER=${POSTGRES_USERNAME:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_ASSISTANT_DB:-open_asm}
- REDIS_URL=${REDIS_URL:-redis://:password@redis:6379/1}
- ASSISTANT_HOST=${ASSISTANT_HOST:-0.0.0.0}
- ASSISTANT_PORT=${ASSISTANT_PORT:-8000}
- SEARXNG_URL=http://searxng:8080
- OASM_CORE_API_URL=${OASM_CORE_API_URL:-http://host.docker.internal:6276}
- OASM_CLOUD_APIKEY=${OASM_CLOUD_APIKEY:-change_me}
volumes:
- assistant-logs:/app/logs
- assistant-knowledge:/app/knowledge
ports:
- '${ASSISTANT_PORT:-8000}:8000'
networks:
- oasm
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- searxng
searxng:
container_name: searxng
image: docker.io/searxng/searxng:latest
restart: unless-stopped
networks:
- oasm
ports:
- '8080:8080'
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
- ./searxng:/etc/searxng:rw
- searxng-data:/var/cache/searxng:rw
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- SEARXNG_PORT=8080
logging:
driver: 'json-file'
options:
max-size: '1m'
max-file: '1'
volumes:
pgdata:
nuclei-templates:
redis-data:
redpanda-data:
geoip-data:
api-storage:
assistant-logs:
assistant-knowledge:
searxng-data:
networks:
oasm:
driver: bridge