-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
139 lines (132 loc) · 3.44 KB
/
docker-compose.yml
File metadata and controls
139 lines (132 loc) · 3.44 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
services:
console:
container_name: oasm-console
image: oasm/oasm-console:${IMAGE_TAG:-latest}
platform: linux/amd64
networks:
- oasm
ports:
- '6276:80'
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
restart: on-failure
depends_on:
core-api:
condition: service_healthy
core-api:
container_name: oasm-api
image: oasm/oasm-api:${IMAGE_TAG:-latest}
platform: linux/amd64
networks:
- oasm
environment:
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
- POSTGRES_USERNAME=${POSTGRES_USERNAME:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_DB=${POSTGRES_DB:-open_asm}
- POSTGRES_SSL=${POSTGRES_SSL:-false}
- PORT=${PORT:-6276}
- OASM_CLOUD_APIKEY=${OASM_CLOUD_APIKEY}
- REDIS_URL=${REDIS_URL:-redis://:open_asm@redis:6379/0}
- GEO_IP_URL=geo-ip-database:4360
- AI_ASSISTANT_URL=${AI_ASSISTANT_URL:-oasm-assistant:8000}
restart: on-failure
volumes:
- api-storage:/app/.storage:rw
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
geo-ip-database:
condition: service_healthy
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:${PORT:-6276}/api/health']
interval: 1s
timeout: 60s
retries: 10
oasm-worker:
image: oasm/oasm-worker:${IMAGE_TAG:-latest}
platform: linux/amd64
environment:
- API=http://core-api:${PORT:-6276}/
- MAX_JOBS=10
- OASM_CLOUD_APIKEY=${OASM_CLOUD_APIKEY}
volumes:
- nuclei-templates:/root/nuclei-templates:rw
networks:
- oasm
restart: on-failure
depends_on:
core-api:
condition: service_healthy
deploy:
mode: replicated
replicas: 3
postgres:
container_name: oasm-postgres
image: pgvector/pgvector:pg17
restart: on-failure
environment:
- POSTGRES_USER=${POSTGRES_USERNAME:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-open_asm}
volumes:
- pgdata:/var/lib/postgresql/data:rw
networks:
- oasm
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 1s
timeout: 5s
retries: 10
redis:
container_name: oasm-redis
image: redis:alpine
restart: on-failure
networks:
- oasm
volumes:
- redis-data:/data
command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes --save 3600 1 --save 30 500 --save 300 100 --save 60 10000
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
healthcheck:
test: ['CMD', 'redis-cli', '-a', '${REDIS_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-database:
container_name: geo-ip-database
image: ghcr.io/l1ttps/geoip-proxy:latest
platform: linux/amd64
networks:
- oasm
restart: on-failure
volumes:
- geoip-data:/app/data:rw
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4360']
interval: 1s
timeout: 60s
retries: 10
volumes:
pgdata:
nuclei-templates:
redis-data:
geoip-data:
api-storage:
networks:
oasm:
driver: bridge
name: oasm_net