diff --git a/docker-compose.yml b/docker-compose.yml index 02a6ade..b5aa67b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,14 +33,19 @@ services: - "./ssl/:/etc/ssl/certs" # - "./examples/custom-entrypoint.sh:/custom-entrypoint.sh" # Use the example custom-entrypoint.sh environment: - - "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 -# - "NOREDIR=true" #Do not redirect port 80 -# - "SYNCSERVERS=1 2 3 4" -# - "DISIPV6=true" + - "REDIS_FQDN=redis" + - "INIT=true" # Initialze MISP, things includes, attempting to import SQL and the Files DIR + - "CRON_USER_ID=1" # The MISP user ID to run cron jobs as +# - "SYNCSERVERS=1 2 3 4" # The MISP Feed servers to sync in the cron job + # Database Configuration (And their defaults) +# - "MYSQL_HOST=db" +# - "MYSQL_USER=misp" +# - "MYSQL_PASSWORD=example" +# - "MYSQL_DATABASE=misp" + # Optional Settings +# - "NOREDIR=true" # Do not redirect port 80 +# - "DISIPV6=true" # Disable IPV6 in nginx misp-modules: image: coolacid/misp-docker:modules-latest diff --git a/server/files/entrypoint_nginx.sh b/server/files/entrypoint_nginx.sh index 171b662..2c9ccc8 100755 --- a/server/files/entrypoint_nginx.sh +++ b/server/files/entrypoint_nginx.sh @@ -28,6 +28,7 @@ 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 + sed -i "s/'database' => 'misp'/'database' => '$MYSQL_DATABASE'/" $MISP_APP_CONFIG_PATH/database.php echo "Configure sane defaults" /var/www/MISP/app/Console/cake Admin setSetting "MISP.redis_host" "$REDIS_FQDN"