2019-11-25 22:58:18 +01:00
|
|
|
version: '3'
|
|
|
|
services:
|
2022-09-03 13:59:35 +02:00
|
|
|
# This is capable to relay via gmail, Amazon SES, or generic relays
|
|
|
|
# See: https://hub.docker.com/r/ixdotai/smtp
|
2020-02-12 17:01:14 +01:00
|
|
|
mail:
|
2022-09-03 13:59:35 +02:00
|
|
|
image: ixdotai/smtp
|
|
|
|
environment:
|
|
|
|
- "SMARTHOST_ADDRESS=${SMARTHOST_ADDRESS}"
|
|
|
|
- "SMARTHOST_PORT=${SMARTHOST_PORT}"
|
|
|
|
- "SMARTHOST_USER=${SMARTHOST_USER}"
|
|
|
|
- "SMARTHOST_PASSWORD=${SMARTHOST_PASSWORD}"
|
|
|
|
- "SMARTHOST_ALIASES=${SMARTHOST_ALIASES}"
|
2020-02-12 17:01:14 +01:00
|
|
|
|
2019-11-25 22:58:18 +01:00
|
|
|
redis:
|
2024-04-21 14:18:11 +02:00
|
|
|
image: valkey/valkey:7.2
|
2024-08-13 15:23:45 +02:00
|
|
|
command: "--requirepass ${REDIS_PASSWORD:-redispassword}"
|
2024-04-24 14:00:23 +02:00
|
|
|
healthcheck:
|
2024-08-13 15:23:45 +02:00
|
|
|
test: "valkey-cli -a ${REDIS_PASSWORD:-redispassword} ping || exit 1"
|
2024-04-24 14:00:23 +02:00
|
|
|
interval: 2s
|
|
|
|
timeout: 1s
|
|
|
|
retries: 3
|
|
|
|
start_period: 30s
|
2019-11-25 22:58:18 +01:00
|
|
|
|
|
|
|
db:
|
2022-09-03 13:59:35 +02:00
|
|
|
# We use MariaDB because it supports ARM and has the expected collations
|
2023-10-08 14:52:51 +02:00
|
|
|
image: mariadb:10.11
|
2019-11-25 22:58:18 +01:00
|
|
|
restart: always
|
|
|
|
environment:
|
2023-10-16 11:20:00 +02:00
|
|
|
- "MYSQL_USER=${MYSQL_USER:-misp}"
|
|
|
|
- "MYSQL_PASSWORD=${MYSQL_PASSWORD:-example}"
|
|
|
|
- "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-password}"
|
|
|
|
- "MYSQL_DATABASE=${MYSQL_DATABASE:-misp}"
|
2024-08-30 08:51:40 +02:00
|
|
|
command: "\
|
|
|
|
--innodb-buffer-pool-size=${INNODB_BUFFER_POOL_SIZE:-2048M} \
|
|
|
|
--innodb-change-buffering=${INNODB_CHANGE_BUFFERING:-none} \
|
|
|
|
--innodb-io-capacity=${INNODB_IO_CAPACITY:-1000} \
|
|
|
|
--innodb-io-capacity-max=${INNODB_IO_CAPACITY_MAX:-2000} \
|
|
|
|
--innodb-log-file-size=${INNODB_LOG_FILE_SIZE:-600M} \
|
|
|
|
--innodb-read-io-threads=${INNODB_READ_IO_THREADS:-16} \
|
|
|
|
--innodb-stats-persistent=${INNODB_STATS_PERSISTENT:-ON} \
|
|
|
|
--innodb-write-io-threads=${INNODB_WRITE_IO_THREADS:-4}"
|
2020-03-21 17:34:09 +01:00
|
|
|
volumes:
|
|
|
|
- mysql_data:/var/lib/mysql
|
2020-12-11 17:10:36 +01:00
|
|
|
cap_add:
|
|
|
|
- SYS_NICE # CAP_SYS_NICE Prevent runaway mysql log
|
2024-04-24 14:00:23 +02:00
|
|
|
healthcheck:
|
|
|
|
test: mysqladmin --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD status
|
|
|
|
interval: 2s
|
|
|
|
timeout: 1s
|
|
|
|
retries: 3
|
|
|
|
start_period: 30s
|
2019-11-25 22:58:18 +01:00
|
|
|
|
2023-12-07 23:25:21 +01:00
|
|
|
misp-core:
|
2024-08-24 14:50:19 +02:00
|
|
|
image: ghcr.io/misp/misp-docker/misp-core:${CORE_RUNNING_TAG:-latest}
|
|
|
|
cap_add:
|
2024-08-30 09:05:17 +02:00
|
|
|
- AUDIT_WRITE
|
2022-12-06 18:13:23 +01:00
|
|
|
build:
|
2023-12-07 23:25:21 +01:00
|
|
|
context: core/.
|
2022-12-06 18:13:23 +01:00
|
|
|
args:
|
2024-03-08 11:43:28 +01:00
|
|
|
- CORE_TAG=${CORE_TAG:?Missing .env file, see README.md for instructions}
|
2023-12-08 09:45:49 +01:00
|
|
|
- CORE_COMMIT=${CORE_COMMIT}
|
2024-03-08 11:43:28 +01:00
|
|
|
- PHP_VER=${PHP_VER:?Missing .env file, see README.md for instructions}
|
2023-09-17 13:37:02 +02:00
|
|
|
- PYPI_REDIS_VERSION=${PYPI_REDIS_VERSION}
|
|
|
|
- PYPI_LIEF_VERSION=${PYPI_LIEF_VERSION}
|
|
|
|
- PYPI_PYDEEP2_VERSION=${PYPI_PYDEEP2_VERSION}
|
|
|
|
- PYPI_PYTHON_MAGIC_VERSION=${PYPI_PYTHON_MAGIC_VERSION}
|
|
|
|
- PYPI_MISP_LIB_STIX2_VERSION=${PYPI_MISP_LIB_STIX2_VERSION}
|
|
|
|
- PYPI_MAEC_VERSION=${PYPI_MAEC_VERSION}
|
|
|
|
- PYPI_MIXBOX_VERSION=${PYPI_MIXBOX_VERSION}
|
|
|
|
- PYPI_CYBOX_VERSION=${PYPI_CYBOX_VERSION}
|
|
|
|
- PYPI_PYMISP_VERSION=${PYPI_PYMISP_VERSION}
|
2024-08-06 13:37:15 +02:00
|
|
|
- PYPI_MISP_STIX_VERSION=${PYPI_MISP_STIX_VERSION}
|
2019-11-28 20:14:38 +01:00
|
|
|
depends_on:
|
2024-04-24 14:00:23 +02:00
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
2024-06-26 15:38:09 +02:00
|
|
|
healthcheck:
|
2024-08-26 10:10:51 +02:00
|
|
|
test: curl -ks ${BASE_URL:-https://localhost}/users/heartbeat > /dev/null || exit 1
|
2024-06-26 15:38:09 +02:00
|
|
|
interval: 2s
|
|
|
|
timeout: 1s
|
|
|
|
retries: 3
|
|
|
|
start_period: 30s
|
|
|
|
start_interval: 30s
|
2019-11-25 22:58:18 +01:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
volumes:
|
2022-12-06 18:13:23 +01:00
|
|
|
- "./configs/:/var/www/MISP/app/Config/"
|
|
|
|
- "./logs/:/var/www/MISP/app/tmp/logs/"
|
|
|
|
- "./files/:/var/www/MISP/app/files/"
|
|
|
|
- "./ssl/:/etc/nginx/certs/"
|
|
|
|
- "./gnupg/:/var/www/MISP/.gnupg/"
|
2023-05-09 16:11:07 +02:00
|
|
|
# customize by replacing ${CUSTOM_PATH} with a path containing 'files/customize_misp.sh'
|
|
|
|
# - "${CUSTOM_PATH}/:/custom/"
|
2024-02-21 18:04:41 +01:00
|
|
|
# mount custom ca root certificates
|
|
|
|
# - "./rootca.pem:/usr/local/share/ca-certificates/rootca.crt"
|
2019-11-25 22:58:18 +01:00
|
|
|
environment:
|
2023-12-22 11:02:20 +01:00
|
|
|
- "BASE_URL=${BASE_URL}"
|
2023-05-15 13:13:25 +02:00
|
|
|
- "CRON_USER_ID=${CRON_USER_ID}"
|
2023-09-25 22:40:13 +02:00
|
|
|
- "DISABLE_IPV6=${DISABLE_IPV6}"
|
2024-03-01 13:57:53 +01:00
|
|
|
- "DISABLE_SSL_REDIRECT=${DISABLE_SSL_REDIRECT}"
|
2024-06-06 10:30:12 +02:00
|
|
|
- "ENABLE_DB_SETTINGS=${ENABLE_DB_SETTINGS}"
|
2024-09-03 13:45:51 +02:00
|
|
|
- "ENABLE_BACKGROUND_UPDATES=${ENABLE_BACKGROUND_UPDATES}"
|
2024-08-13 15:23:37 +02:00
|
|
|
- "ENCRYPTION_KEY=${ENCRYPTION_KEY}"
|
2023-05-09 16:11:07 +02:00
|
|
|
# standard settings
|
|
|
|
- "ADMIN_EMAIL=${ADMIN_EMAIL}"
|
2023-05-14 17:56:55 +02:00
|
|
|
- "ADMIN_PASSWORD=${ADMIN_PASSWORD}"
|
2023-05-09 16:11:07 +02:00
|
|
|
- "ADMIN_KEY=${ADMIN_KEY}"
|
|
|
|
- "ADMIN_ORG=${ADMIN_ORG}"
|
|
|
|
- "GPG_PASSPHRASE=${GPG_PASSPHRASE}"
|
2024-02-21 18:04:41 +01:00
|
|
|
# OIDC authentication settings
|
2023-12-11 11:23:04 +01:00
|
|
|
- "OIDC_ENABLE=${OIDC_ENABLE}"
|
|
|
|
- "OIDC_PROVIDER_URL=${OIDC_PROVIDER_URL}"
|
|
|
|
- "OIDC_CLIENT_ID=${OIDC_CLIENT_ID}"
|
|
|
|
- "OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET}"
|
|
|
|
- "OIDC_ROLES_PROPERTY=${OIDC_ROLES_PROPERTY}"
|
2023-12-11 12:19:49 +01:00
|
|
|
- "OIDC_ROLES_MAPPING=${OIDC_ROLES_MAPPING}"
|
2023-12-11 11:23:04 +01:00
|
|
|
- "OIDC_DEFAULT_ORG=${OIDC_DEFAULT_ORG}"
|
2024-10-02 13:24:12 +02:00
|
|
|
- "OIDC_LOGOUT_URL=${OIDC_LOGOUT_URL}"
|
2024-02-21 18:04:41 +01:00
|
|
|
# LDAP authentication settings
|
|
|
|
- "LDAP_ENABLE=${LDAP_ENABLE}"
|
|
|
|
- "LDAP_APACHE_ENV=${LDAP_APACHE_ENV}"
|
|
|
|
- "LDAP_SERVER=${LDAP_SERVER}"
|
|
|
|
- "LDAP_STARTTLS=${LDAP_STARTTLS}"
|
|
|
|
- "LDAP_READER_USER=${LDAP_READER_USER}"
|
|
|
|
- "LDAP_READER_PASSWORD=${LDAP_READER_PASSWORD}"
|
|
|
|
- "LDAP_DN=${LDAP_DN}"
|
|
|
|
- "LDAP_SEARCH_FILTER=${LDAP_SEARCH_FILTER}"
|
|
|
|
- "LDAP_SEARCH_ATTRIBUTE=${LDAP_SEARCH_ATTRIBUTE}"
|
|
|
|
- "LDAP_FILTER=${LDAP_FILTER}"
|
|
|
|
- "LDAP_DEFAULT_ROLE_ID=${LDAP_DEFAULT_ROLE_ID}"
|
|
|
|
- "LDAP_DEFAULT_ORG=${LDAP_DEFAULT_ORG}"
|
|
|
|
- "LDAP_EMAIL_FIELD=${LDAP_EMAIL_FIELD}"
|
|
|
|
- "LDAP_OPT_PROTOCOL_VERSION=${LDAP_OPT_PROTOCOL_VERSION}"
|
|
|
|
- "LDAP_OPT_NETWORK_TIMEOUT=${LDAP_OPT_NETWORK_TIMEOUT}"
|
|
|
|
- "LDAP_OPT_REFERRALS=${LDAP_OPT_REFERRALS}"
|
2024-04-10 17:56:44 +02:00
|
|
|
# AAD authentication settings
|
2024-04-12 20:54:43 +02:00
|
|
|
- "AAD_ENABLE=${AAD_ENABLE}"
|
2024-04-10 17:56:44 +02:00
|
|
|
- "AAD_CLIENT_ID=${AAD_CLIENT_ID}"
|
|
|
|
- "AAD_TENANT_ID=${AAD_TENANT_ID}"
|
|
|
|
- "AAD_CLIENT_SECRET=${AAD_CLIENT_SECRET}"
|
|
|
|
- "AAD_REDIRECT_URI=${AAD_REDIRECT_URI}"
|
|
|
|
- "AAD_PROVIDER=${AAD_PROVIDER}"
|
|
|
|
- "AAD_PROVIDER_USER=${AAD_PROVIDER_USER}"
|
|
|
|
- "AAD_MISP_USER=${AAD_MISP_USER}"
|
|
|
|
- "AAD_MISP_ORGADMIN=${AAD_MISP_ORGADMIN}"
|
|
|
|
- "AAD_MISP_SITEADMIN=${AAD_MISP_SITEADMIN}"
|
|
|
|
- "AAD_CHECK_GROUPS=${AAD_CHECK_GROUPS}"
|
2024-09-12 11:11:15 +02:00
|
|
|
# Nginx settings
|
|
|
|
- "NGINX_X_FORWARDED_FOR=${NGINX_X_FORWARDED_FOR}"
|
|
|
|
- "NGINX_SET_REAL_IP_FROM=${NGINX_SET_REAL_IP_FROM}"
|
2024-06-06 13:41:12 +02:00
|
|
|
# Proxy settings
|
2024-06-11 13:36:39 +02:00
|
|
|
- "PROXY_ENABLE=${PROXY_ENABLE}"
|
2024-06-06 13:41:12 +02:00
|
|
|
- "PROXY_HOST=${PROXY_HOST}"
|
|
|
|
- "PROXY_PORT=${PROXY_PORT}"
|
|
|
|
- "PROXY_METHOD=${PROXY_METHOD}"
|
|
|
|
- "PROXY_USER=${PROXY_USER}"
|
|
|
|
- "PROXY_PASSWORD=${PROXY_PASSWORD}"
|
2023-05-13 15:17:53 +02:00
|
|
|
# sync server settings (see https://www.misp-project.org/openapi/#tag/Servers for more options)
|
2022-12-06 18:13:23 +01:00
|
|
|
- "SYNCSERVERS=${SYNCSERVERS}"
|
2022-11-04 18:22:12 +01:00
|
|
|
- |
|
|
|
|
SYNCSERVERS_1_DATA=
|
|
|
|
{
|
2023-05-13 15:17:53 +02:00
|
|
|
"remote_org_uuid": "${SYNCSERVERS_1_UUID}",
|
|
|
|
"name": "${SYNCSERVERS_1_NAME}",
|
|
|
|
"authkey": "${SYNCSERVERS_1_KEY}",
|
2022-12-06 18:13:23 +01:00
|
|
|
"url": "${SYNCSERVERS_1_URL}",
|
2024-08-06 14:18:32 +02:00
|
|
|
"pull_rules": "${SYNCSERVERS_1_PULL_RULES}",
|
2022-11-04 18:22:12 +01:00
|
|
|
"pull": true
|
|
|
|
}
|
2023-10-16 11:20:00 +02:00
|
|
|
# mysql settings
|
|
|
|
- "MYSQL_HOST=${MYSQL_HOST:-db}"
|
|
|
|
- "MYSQL_PORT=${MYSQL_PORT:-3306}"
|
|
|
|
- "MYSQL_USER=${MYSQL_USER:-misp}"
|
|
|
|
- "MYSQL_PASSWORD=${MYSQL_PASSWORD:-example}"
|
|
|
|
- "MYSQL_DATABASE=${MYSQL_DATABASE:-misp}"
|
2024-08-13 15:23:45 +02:00
|
|
|
# redis settings
|
2024-08-20 21:08:02 +02:00
|
|
|
- "REDIS_HOST=${REDIS_HOST:-redis}"
|
|
|
|
- "REDIS_PORT=${REDIS_PORT:-6379}"
|
2024-08-13 15:23:45 +02:00
|
|
|
- "REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}"
|
2024-06-11 13:36:39 +02:00
|
|
|
# Debug setting
|
|
|
|
- "DEBUG=${DEBUG}"
|
2024-06-20 09:57:30 +02:00
|
|
|
# SMTP setting
|
|
|
|
- "SMTP_FQDN=${SMTP_FQDN}"
|
2024-08-24 14:50:19 +02:00
|
|
|
# NGINX settings
|
|
|
|
- "FASTCGI_READ_TIMEOUT=${FASTCGI_READ_TIMEOUT:-300s}"
|
|
|
|
- "FASTCGI_SEND_TIMEOUT=${FASTCGI_SEND_TIMEOUT:-300s}"
|
|
|
|
- "FASTCGI_CONNECT_TIMEOUT=${FASTCGI_CONNECT_TIMEOUT:-300s}"
|
|
|
|
# PHP settings
|
|
|
|
- "PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-2048M}"
|
|
|
|
- "PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:-300}"
|
|
|
|
- "PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-50M}"
|
|
|
|
- "PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-50M}"
|
|
|
|
- "PHP_MAX_INPUT_TIME:${PHP_MAX_INPUT_TIME:-300}"
|
2024-10-04 15:47:00 +02:00
|
|
|
# Security Settings
|
|
|
|
- "HSTS_MAX_AGE=${HSTS_MAX_AGE}"
|
|
|
|
- "X_FRAME_OPTIONS=${X_FRAME_OPTIONS}"
|
|
|
|
- "CONTENT_SECURITY_POLICY=${CONTENT_SECURITY_POLICY}"
|
2023-04-13 16:02:02 +02:00
|
|
|
|
2019-11-25 22:58:18 +01:00
|
|
|
misp-modules:
|
2024-08-24 14:50:19 +02:00
|
|
|
image: ghcr.io/misp/misp-docker/misp-modules:${MODULES_RUNNING_TAG:-latest}
|
2022-12-06 18:13:23 +01:00
|
|
|
build:
|
|
|
|
context: modules/.
|
|
|
|
args:
|
2024-03-08 11:43:28 +01:00
|
|
|
- MODULES_TAG=${MODULES_TAG:?Missing .env file, see README.md for instructions}
|
2022-12-06 18:13:23 +01:00
|
|
|
- MODULES_COMMIT=${MODULES_COMMIT}
|
2024-03-08 11:43:28 +01:00
|
|
|
- LIBFAUP_COMMIT=${LIBFAUP_COMMIT:?Missing .env file, see README.md for instructions}
|
2019-11-28 20:14:38 +01:00
|
|
|
environment:
|
2024-08-20 21:08:02 +02:00
|
|
|
- "REDIS_BACKEND=${REDIS_HOST:-redis}"
|
|
|
|
- "REDIS_PORT=${REDIS_PORT:-6379}"
|
2024-08-13 15:23:45 +02:00
|
|
|
- "REDIS_PW=${REDIS_PASSWORD:-redispassword}"
|
2019-11-28 20:14:38 +01:00
|
|
|
depends_on:
|
2024-04-24 14:00:23 +02:00
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
2019-11-28 20:14:38 +01:00
|
|
|
|
2020-03-21 17:34:09 +01:00
|
|
|
volumes:
|
|
|
|
mysql_data:
|