-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
executable file
·207 lines (198 loc) · 5.17 KB
/
docker-compose.yml
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
services:
caddy-proxy-waf:
image: ghcr.io/altersec/caddy-proxy-waf:latest
container_name: caddy-proxy-waf
restart: always
ports:
- "80:80"
- "443:443"
- "443:443/udp"
environment:
- SERVER_NAME=${SERVER_NAME:-localhost}
volumes:
- caddy_data:/data
networks:
- proxy
api:
image: ghcr.io/ciso360ai/api:latest
build:
context: ./api/.
container_name: api
restart: always
depends_on:
cache:
condition: service_healthy
scan_tls:
condition: service_healthy
postgres:
condition: service_healthy
ports:
- "8055:8055"
env_file:
- .env
environment:
- TELEMETRY="false"
# - LOGGER_HTTP_USE_LEVEL="silent" # DO NOT log api since rproxy logs traffic already
- DB_CLIENT="pg"
- DB_HOST="postgres"
- DB_PORT=5432
- DB_DATABASE=${PG1_DB}
- DB_USER=${PG1_USER}
- DB_PASSWORD=${PG1_PASS}
- DB_SEARCH_PATH=public,timetable
- CACHE_ENABLED="true"
- CACHE_STORE=redis"
- CACHE_REDIS"redis://cache:6379"
volumes:
- ./api/extensions:/directus/extensions
- ./api/migrations:/directus/migrations
- ./api/uploads:/directus/uploads
- ./results:/results
networks:
- db
- proxy
- internal
cache:
container_name: cache
image: redis:7-alpine
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
networks:
- db
postgres:
image: postgres:16.2
container_name: postgres
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-d", "${PG1_DB}" ]
timeout: 1s
retries: 5
interval: 1s
ports:
- 5432:5432
command: ["postgres", "-c", "log_statement=none", "-c", "log_checkpoints=off"]
environment:
POSTGRES_DB: ${PG1_DB}
POSTGRES_USER: ${PG1_USER}
POSTGRES_PASSWORD: ${PG1_PASS}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backup:/backup
networks:
- db
scan_tls:
image: ghcr.io/ciso360ai/scan_tls:latest
build:
context: ./scan_tls/.
container_name: scan_tls
hostname: scan_tls
restart: always
depends_on:
postgres:
condition: service_healthy
#FIX IPv6 issue
# sysctls:
# net.ipv6.conf.lo.disable_ipv6: 1
healthcheck:
# test: ["CMD-SHELL", "curl -f http://localhost:8008/readiness || exit 1"]
test: ["CMD-SHELL", "exit 0"]
timeout: 1s
interval: 1s
retries: 5
environment:
POSTGRES_HOST: ${PG1_HOST}
POSTGRES_PORT: ${PG1_PORT}
POSTGRES_DB: ${PG1_DB}
POSTGRES_USER: ${PG1_USER}
POSTGRES_PASSWORD: ${PG1_PASS}
SERVER_NAME: ${SERVER_NAME}
USER_AGENT: ${USER_AGENT} #TBD
# command: ["--cron-workers=4"]
volumes:
- ./results:/results
- ./logs:/logs
- ./scan_tls/scripts/scan_tls:/usr/local/bin/scan_tls
- ./scan_tls/scripts/import_scan:/usr/local/bin/import_scan
networks:
- internal
- db
scan_domain:
image: ghcr.io/ciso360ai/scan_domain:latest
build:
context: ./scan_domain/.
container_name: scan_domain
hostname: scan_domain
restart: always
depends_on:
scan_tls:
condition: service_healthy
healthcheck:
# test: ["CMD-SHELL", "curl -f http://localhost:8008/readiness || exit 1"]
test: ["CMD-SHELL", "exit 0"]
timeout: 1s
interval: 1s
retries: 5
environment:
POSTGRES_HOST: ${PG1_HOST}
POSTGRES_PORT: ${PG1_PORT}
POSTGRES_DB: ${PG1_DB}
POSTGRES_USER: ${PG1_USER}
POSTGRES_PASSWORD: ${PG1_PASS}
SERVER_NAME: ${SERVER_NAME}
USER_AGENT: ${USER_AGENT} #TBD
# command: ["--cron-workers=4"]
volumes:
- ./results:/results
- ./logs:/logs
- ./scan_domain/scripts/scan_domain:/usr/local/bin/scan_domain
- ./scan_domain/scripts/import_scan:/usr/local/bin/import_scan
- ./scan_domain/config:/scan_domain/config
networks:
- internal
- db
scan_email:
image: ghcr.io/ciso360ai/scan_email:latest
build:
context: ./scan_email/.
container_name: scan_email
hostname: scan_email
restart: always
depends_on:
scan_tls:
condition: service_healthy
healthcheck:
# test: ["CMD-SHELL", "curl -f http://localhost:8008/readiness || exit 1"]
test: ["CMD-SHELL", "exit 0"]
timeout: 1s
interval: 1s
retries: 5
environment:
POSTGRES_HOST: ${PG1_HOST}
POSTGRES_PORT: ${PG1_PORT}
POSTGRES_DB: ${PG1_DB}
POSTGRES_USER: ${PG1_USER}
POSTGRES_PASSWORD: ${PG1_PASS}
SERVER_NAME: ${SERVER_NAME}
USER_AGENT: ${USER_AGENT}
HIBP_API_KEY: ${HIBP_API_KEY}
PYTHONUNBUFFERED: 1
# command: ["--cron-workers=4"]
volumes:
- ./results:/results
- ./logs:/logs
- ./scan_email/scripts/scan_domain_hibp:/usr/local/bin/scan_domain_hibp
- ./scan_email/scripts/scan_email_hibp:/usr/local/bin/scan_email_hibp
- ./scan_email/config:/scan_domain/config
networks:
- internal
- db
networks:
proxy:
db:
internal:
volumes:
postgres_data:
driver: local
caddy_data:
driver: local