File tree Expand file tree Collapse file tree 7 files changed +63
-10
lines changed Expand file tree Collapse file tree 7 files changed +63
-10
lines changed Original file line number Diff line number Diff line change @@ -33,5 +33,15 @@ export ENABLE_DB_SETTINGS=${ENABLE_DB_SETTINGS:-false}
33
33
export PROXY_ENABLE=${PROXY_ENABLE:- false}
34
34
export DEBUG=${DEBUG:- 0}
35
35
36
+ export FASTCGI_READ_TIMEOUT=${FASTCGI_READ_TIMEOUT:- 300s}
37
+ export FASTCGI_SEND_TIMEOUT=${FASTCGI_SEND_TIMEOUT:- 300s}
38
+ export FASTCGI_CONNECT_TIMEOUT=${FASTCGI_CONNECT_TIMEOUT:- 300s}
39
+
40
+ export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:- 2048M}
41
+ export PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:- 300}
42
+ export PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:- 50M}
43
+ export PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:- 50M}
44
+ export PHP_MAX_INPUT_TIME:${PHP_MAX_INPUT_TIME:- 300}
45
+
36
46
# start supervisord using the main configuration file so we have a socket interface
37
47
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ change_php_vars() {
12
12
for FILE in /etc/php/* /fpm/php.ini
13
13
do
14
14
[[ -e $FILE ]] || break
15
- sed -i " s/memory_limit = .*/memory_limit = 2048M/" " $FILE "
16
- sed -i " s/max_execution_time = .*/max_execution_time = 300/" " $FILE "
17
- sed -i " s/upload_max_filesize = .*/upload_max_filesize = 50M/" " $FILE "
18
- sed -i " s/post_max_size = .*/post_max_size = 50M/" " $FILE "
15
+ sed -i " s/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT} /" " $FILE "
16
+ sed -i " s/max_execution_time = .*/max_execution_time = ${PHP_MAX_EXECUTION_TIME} /" " $FILE "
17
+ sed -i " s/upload_max_filesize = .*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE} /" " $FILE "
18
+ sed -i " s/post_max_size = .*/post_max_size = ${PHP_POST_MAX_SIZE} /" " $FILE "
19
+ sed -i " s/max_input_time = .*/max_input_time = ${PHP_MAX_INPUT_TIME} |" " $FILE "
19
20
sed -i " s/session.save_handler = .*/session.save_handler = redis/" " $FILE "
20
21
sed -i " s|.*session.save_path = .*|session.save_path = '$( echo $REDIS_HOST | grep -E ' ^\w+://' || echo tcp://$REDIS_HOST ) :6379?auth=${REDIS_PASSWORD} '|" " $FILE "
21
22
sed -i " s/session.sid_length = .*/session.sid_length = 64/" " $FILE "
Original file line number Diff line number Diff line change @@ -199,6 +199,14 @@ flip_nginx() {
199
199
}
200
200
201
201
init_nginx () {
202
+ # Adjust timeouts
203
+ echo " ... adjusting 'fastcgi_read_timeout' to ${FASTCGI_READ_TIMEOUT} "
204
+ sed -i " s/fastcgi_read_timeout .*;/fastcgi_read_timeout ${FASTCGI_READ_TIMEOUT} ;/" /etc/nginx/includes/misp
205
+ echo " ... adjusting 'fastcgi_send_timeout' to ${FASTCGI_SEND_TIMEOUT} "
206
+ sed -i " s/fastcgi_send_timeout .*;/fastcgi_send_timeout ${FASTCGI_SEND_TIMEOUT} ;/" /etc/nginx/includes/misp
207
+ echo " ... adjusting 'fastcgi_connect_timeout' to ${FASTCGI_CONNECT_TIMEOUT} "
208
+ sed -i " s/fastcgi_connect_timeout .*;/fastcgi_connect_timeout ${FASTCGI_CONNECT_TIMEOUT} ;/" /etc/nginx/includes/misp
209
+
202
210
# Testing for files also test for links, and generalize better to mounted files
203
211
if [[ ! -f " /etc/nginx/sites-enabled/misp80" ]]; then
204
212
echo " ... enabling port 80 redirect"
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ location / {
25
25
location ~ ^/[^/]+\.php(/|$) {
26
26
include snippets/fastcgi-php.conf;
27
27
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
28
- fastcgi_read_timeout 300;
28
+ fastcgi_read_timeout 300s;
29
+ fastcgi_send_timeout 300s;
30
+ fastcgi_connect_timeout 300s;
29
31
fastcgi_split_path_info ^(.+\.php)(/.+)$;
30
32
set $path_info $fastcgi_path_info;
31
33
fastcgi_param PATH_INFO $path_info;
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ services:
42
42
start_period : 30s
43
43
44
44
misp-core :
45
- image : ghcr.io/misp/misp-docker/misp-core:latest
45
+ image : ghcr.io/misp/misp-docker/misp-core:${CORE_RUNNING_TAG:-latest}
46
+ cap_add :
47
+ - CAP_AUDIT_WRITE
46
48
build :
47
49
context : core/.
48
50
args :
@@ -167,9 +169,19 @@ services:
167
169
- " DEBUG=${DEBUG}"
168
170
# SMTP setting
169
171
- " SMTP_FQDN=${SMTP_FQDN}"
172
+ # NGINX settings
173
+ - " FASTCGI_READ_TIMEOUT=${FASTCGI_READ_TIMEOUT:-300s}"
174
+ - " FASTCGI_SEND_TIMEOUT=${FASTCGI_SEND_TIMEOUT:-300s}"
175
+ - " FASTCGI_CONNECT_TIMEOUT=${FASTCGI_CONNECT_TIMEOUT:-300s}"
176
+ # PHP settings
177
+ - " PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-2048M}"
178
+ - " PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:-300}"
179
+ - " PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-50M}"
180
+ - " PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-50M}"
181
+ - " PHP_MAX_INPUT_TIME:${PHP_MAX_INPUT_TIME:-300}"
170
182
171
183
misp-modules :
172
- image : ghcr.io/misp/misp-docker/misp-modules:latest
184
+ image : ghcr.io/misp/misp-docker/misp-modules:${MODULES_RUNNING_TAG:- latest}
173
185
build :
174
186
context : modules/.
175
187
args :
Original file line number Diff line number Diff line change @@ -30,9 +30,14 @@ FROM "${DOCKER_HUB_PROXY}python:3.12-slim-bookworm" AS python-build
30
30
EOF
31
31
32
32
WORKDIR /srv/misp-modules
33
- RUN pip install pipenv
34
- RUN pipenv requirements > requirements.txt
33
+ RUN pip install poetry
34
+ RUN sed -i "s/^python = .*/python = \" $(python -c 'import platform; print(platform.python_version())')\" /" pyproject.toml
35
+ RUN poetry lock
36
+ # RUN poetry install --with unstable
37
+ RUN poetry self add poetry-plugin-export
38
+ RUN poetry export --with unstable --without-hashes -f requirements.txt -o requirements.txt
35
39
RUN pip wheel -r requirements.txt --no-cache-dir -w /wheels/
40
+ RUN poetry build --output /wheels/
36
41
37
42
WORKDIR /srv/
38
43
RUN rm -rf /srv/misp-modules
Original file line number Diff line number Diff line change 3
3
# #
4
4
5
5
CORE_TAG = v2.4.196
6
- MODULES_TAG = v2.4.195
6
+ MODULES_TAG = v2.4.196
7
7
PHP_VER = 20190902
8
8
LIBFAUP_COMMIT = 3a26d0a
9
9
@@ -28,6 +28,9 @@ LIBFAUP_COMMIT=3a26d0a
28
28
# Run-time variables
29
29
# #
30
30
31
+ # CORE_RUNNING_TAG=latest
32
+ # MODULES_RUNNING_TAG=latest
33
+
31
34
# Email/username for user #1, defaults to MISP's default ([email protected] )
32
35
ADMIN_EMAIL =
33
36
# name of org #1, default to MISP's default (ORGNAME)
@@ -166,3 +169,15 @@ SYNCSERVERS_1_PULL_RULES=
166
169
# 1 - Debug on
167
170
# 2 - Debug on + SQL dump
168
171
# DEBUG=
172
+
173
+ # FastCGI configuration
174
+ # FASTCGI_READ_TIMEOUT=300s
175
+ # FASTCGI_SEND_TIMEOUT=300s
176
+ # FASTCGI_CONNECT_TIMEOUT=300s
177
+
178
+ # PHP fpm configuration
179
+ # PHP_MEMORY_LIMIT=2048
180
+ # PHP_MAX_EXECUTION_TIME=300
181
+ # PHP_UPLOAD_MAX_FILESIZE=50M
182
+ # PHP_POST_MAX_SIZE=50M
183
+ # PHP_MAX_INPUT_TIME=300
You can’t perform that action at this time.
0 commit comments