From 33e3155774929e062c5b3353240ffdd1e7970bbf Mon Sep 17 00:00:00 2001 From: Jason Kendall Date: Wed, 29 Jan 2020 15:15:17 -0500 Subject: [PATCH] Set baseurl to localhost so compose works out of the box --- docker-compose.yml | 1 + server/files/entrypoint_apache.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index ed606f0..da6b370 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,6 +31,7 @@ services: - "CRON_USER_ID=1" - "REDIS_FQDN=redis" - "MYSQL_PASSWORD=example" + - "HOSTNAME=https://localhost" - "INIT=true" # Initialze MISP, things includes, attempting to import SQL and the Files DIR misp-modules: diff --git a/server/files/entrypoint_apache.sh b/server/files/entrypoint_apache.sh index cfd89b0..ee0cfb3 100755 --- a/server/files/entrypoint_apache.sh +++ b/server/files/entrypoint_apache.sh @@ -36,6 +36,9 @@ init_misp_config(){ sed -i "s/localhost/$MYSQL_HOST/" $MISP_APP_CONFIG_PATH/database.php sed -i "s/db\s*login/$MYSQL_USER/" $MISP_APP_CONFIG_PATH/database.php sed -i "s/db\s*password/$MYSQL_PASSWORD/" $MISP_APP_CONFIG_PATH/database.php + + echo "Configure sane defaults" + sed -i "s#'baseurl' => ''#'baseurl' => '$HOSTNAME'#" $MISP_APP_CONFIG_PATH/config.php } init_misp_files(){