-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
188 lines (179 loc) · 5.48 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
188 lines (179 loc) · 5.48 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
# IRIS Source Code
# contact@dfir-iris.org
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
services:
rabbitmq:
extends:
file: docker-compose.base.yml
service: rabbitmq
user: rabbitmq
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity || exit 1
start_period: 60s
start_interval: 1s
db:
extends:
file: docker-compose.base.yml
service: db
build:
context: docker/db
image: iriswebapp_db:develop
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: pg_isready -U postgres -d iris_db || exit 1
start_period: 60s
start_interval: 1s
app:
extends:
file: docker-compose.base.yml
service: app
build:
context: .
dockerfile: docker/webApp/Dockerfile
image: iriswebapp_app:develop
ports:
- "8000:8000"
volumes:
- ./source/app:/iriswebapp/app
- ./ui/dist:/iriswebapp/static
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
healthcheck:
test: curl --head --fail http://localhost:8000 || exit 1
# Fresh-DB cold start runs full post-init (migrations, base data, MISP
# taxonomy, module registration) before serving HTTP; 60s was marginal
# and intermittently timed out in CI. Give post-init room.
start_period: 180s
start_interval: 1s
worker:
extends:
file: docker-compose.base.yml
service: worker
build:
context: .
dockerfile: docker/webApp/Dockerfile
image: iriswebapp_app:develop
volumes:
- ./source/app:/iriswebapp/app
depends_on:
app:
condition: service_healthy
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
healthcheck:
test: celery -A app.celery inspect ping || exit 1
start_period: 60s
start_interval: 1s
collab:
image: iriswebapp_app:develop
container_name: iriswebapp_collab
restart: unless-stopped
command: ["uvicorn", "app.collab_server:app", "--host", "0.0.0.0", "--port", "5001"]
env_file:
- .env
environment:
- LOG_LEVEL
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_ADMIN_USER
- POSTGRES_ADMIN_PASSWORD
- POSTGRES_SERVER
- POSTGRES_PORT
- IRIS_SECRET_KEY
- IRIS_SECURITY_PASSWORD_SALT
- IRIS_COLLAB_STORE_PATH=/home/iris/server_data/collab
volumes:
- ./source/app:/iriswebapp/app
- server_data:/home/iris/server_data
expose:
- "5001"
depends_on:
db:
condition: service_healthy
# Wait for app to finish post-init (Alembic migrations + base data) before
# collab boots: collab imports the full Flask app, which re-runs PostInit on
# import. Gating on app avoids two processes racing migrations on a fresh CI
# DB, and lets collab's own post-init short-circuit (already-applied).
app:
condition: service_healthy
networks:
- iris_backend
- iris_frontend
healthcheck:
test: >
python -c "import urllib.request;
urllib.request.urlopen('http://localhost:5001/healthz', timeout=5).read()"
|| exit 1
# Match the app service: fresh-DB post-init on import can exceed 60s.
start_period: 180s
start_interval: 1s
nginx:
extends:
file: docker-compose.base.yml
service: nginx
build:
context: ./docker/nginx
args:
NGINX_CONF_GID: 1234
NGINX_CONF_FILE: ${NGINX_CONF_FILE:-nginx.conf}
image: iriswebapp_nginx:develop
depends_on:
app:
condition: service_healthy
worker:
condition: service_healthy
collab:
condition: service_healthy
frontend:
image: node:24-alpine
profiles: ["new-ui"]
container_name: iris_sveltekit_frontend
restart: unless-stopped
working_dir: /app
environment:
- IRIS_SVELTEKIT_FRONTEND_DIR=${IRIS_SVELTEKIT_FRONTEND_DIR:-../iris-frontend}
- PUBLIC_EXTERNAL_API_URL=${PUBLIC_EXTERNAL_API_URL:-https://127.0.0.1}
- PUBLIC_INTERNAL_API_URL=http://${IRIS_UPSTREAM_SERVER}:${IRIS_UPSTREAM_PORT}
- PUBLIC_USE_MOCK_API_DATA=false
- ORIGIN=https://127.0.0.1
- PROTOCOL_HEADER=x-forwarded-proto
- HOST_HEADER=x-forwarded-host
- NODE_ENV=development
volumes:
- ${IRIS_SVELTEKIT_FRONTEND_DIR:-../iris-frontend}:/app # Map the frontend directory dynamically
- /app/node_modules # Ensure `node_modules` is preserved inside the container
ports:
- "5173:5173"
command: sh -c "npm install && NODE_OPTIONS="--inspect" npm run dev -- --host"
networks:
- iris_backend
- iris_frontend
volumes:
iris-downloads:
user_templates:
server_data:
db_data:
networks:
iris_backend:
name: iris_backend
iris_frontend:
name: iris_frontend