Skip to content

Commit

Permalink
Allow custom modules to be loaded at container startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ostefano committed Mar 7, 2025
1 parent 548d1c5 commit fe3b2fb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 11 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ services:
- "AAD_MISP_ORGADMIN=${AAD_MISP_ORGADMIN}"
- "AAD_MISP_SITEADMIN=${AAD_MISP_SITEADMIN}"
- "AAD_CHECK_GROUPS=${AAD_CHECK_GROUPS}"
# Nginx settings
# nginx settings
- "NGINX_X_FORWARDED_FOR=${NGINX_X_FORWARDED_FOR}"
- "NGINX_SET_REAL_IP_FROM=${NGINX_SET_REAL_IP_FROM}"
- "NGINX_CLIENT_MAX_BODY_SIZE=${NGINX_CLIENT_MAX_BODY_SIZE:-50M}"
# Proxy settings
# proxy settings
- "PROXY_ENABLE=${PROXY_ENABLE}"
- "PROXY_HOST=${PROXY_HOST}"
- "PROXY_PORT=${PROXY_PORT}"
Expand Down Expand Up @@ -212,7 +212,7 @@ services:
- "REDIS_HOST=${REDIS_HOST:-redis}"
- "REDIS_PORT=${REDIS_PORT:-6379}"
- "REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}"
# Debug setting
# debug setting
- "DEBUG=${DEBUG}"
# SMTP setting
- "SMTP_FQDN=${SMTP_FQDN}"
Expand All @@ -233,7 +233,7 @@ services:
- "PHP_FCGI_START_SERVERS=${PHP_FCGI_START_SERVERS:-2}"
- "PHP_FCGI_SPARE_SERVERS=${PHP_FCGI_SPARE_SERVERS:-1}"
- "PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS:-0}"
# Additional PHP settings
# additional PHP settings
- "PHP_SESSION_TIMEOUT=${PHP_SESSION_TIMEOUT:-60}"
- "PHP_SESSION_COOKIE_TIMEOUT=${PHP_SESSION_COOKIE_TIMEOUT:-10080}"
- "PHP_SESSION_DEFAULTS=${PHP_SESSION_DEFAULTS:-php}"
Expand All @@ -242,7 +242,7 @@ services:
- "PHP_SESSION_COOKIE_SECURE=${PHP_SESSION_COOKIE_SECURE:-true}"
- "PHP_SESSION_COOKIE_DOMAIN=${PHP_SESSION_COOKIE_DOMAIN}"
- "PHP_SESSION_COOKIE_SAMESITE=${PHP_SESSION_COOKIE_SAMESITE:-Lax}"
# Security Settings
# security settings
- "HSTS_MAX_AGE=${HSTS_MAX_AGE}"
- "X_FRAME_OPTIONS=${X_FRAME_OPTIONS}"
- "CONTENT_SECURITY_POLICY=${CONTENT_SECURITY_POLICY}"
Expand All @@ -262,6 +262,12 @@ services:
retries: 3
start_period: 5s
start_interval: 5s
volumes:
# custom MISP modules are loaded at startup time
- "./custom/action_mod/:/custom/action_mod/"
- "./custom/expansion/:/custom/expansion/"
- "./custom/export_mod/:/custom/export_mod/"
- "./custom/import_mod/:/custom/import_mod/"

volumes:
mysql_data:
3 changes: 2 additions & 1 deletion modules/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ EOF
COPY --from=python-build /wheels /wheels
RUN pip install --no-cache-dir /wheels/*.whl && rm -rf /wheels
RUN pip uninstall -y pip
RUN mkdir -p /custom/{action_mod,expansion,export_mod,import_mod}

ENTRYPOINT [ "/usr/local/bin/misp-modules", "-l", "0.0.0.0"]
ENTRYPOINT [ "/usr/local/bin/misp-modules", "-l", "0.0.0.0", "-c", "/custom/"]

0 comments on commit fe3b2fb

Please sign in to comment.