From 6a86798e302c3377bbd72f4c9f841f6ad495248c Mon Sep 17 00:00:00 2001 From: "E. Balsa" Date: Tue, 20 Apr 2021 09:12:42 +0200 Subject: [PATCH 1/3] Simplify a bit --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c1baef5..8a2cc97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,8 @@ env: - DOCKER_COMPOSE_VERSION=1.25.3 before_install: - - sudo rm /usr/local/bin/docker-compose - - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - - chmod +x docker-compose - - sudo mv docker-compose /usr/local/bin + - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` | sudo tee /usr/local/bin/docker-compose >/dev/null + - chmod +x /usr/local/bin/docker-compose script: - docker-compose -f docker-compose.yml -f build-docker-compose.yml build From ec8c9c3c73a9070e82b1d11742125b412fffd6de Mon Sep 17 00:00:00 2001 From: "E. Balsa" Date: Tue, 20 Apr 2021 09:13:09 +0200 Subject: [PATCH 2/3] Allow defining the number of parallel workers --- docker-compose.yml | 1 + server/files/entrypoint_nginx.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 6c3eb68..5af92b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,6 +53,7 @@ services: # - "CERTAUTH=optional" # Can be set to optional or on - Step 2 of https://github.com/MISP/MISP/tree/2.4/app/Plugin/CertAuth is still required # - "SECURESSL=true" # Enable higher security SSL in nginx # - "MISP_MODULES_FQDN=http://misp-modules" # Set the MISP Modules FQDN, used for Enrichment_services_url/Import_services_url/Export_services_url +# - "WORKERS=1" #If set to a value larger than 1 this will increase the number of parallel worker processes misp-modules: image: coolacid/misp-docker:modules-latest environment: diff --git a/server/files/entrypoint_nginx.sh b/server/files/entrypoint_nginx.sh index 7371159..1eb0f46 100755 --- a/server/files/entrypoint_nginx.sh +++ b/server/files/entrypoint_nginx.sh @@ -50,6 +50,11 @@ init_misp_config(){ /var/www/MISP/app/Console/cake Admin setSetting "Plugin.Export_services_url" "$MISP_MODULES_FQDN" /var/www/MISP/app/Console/cake Admin setSetting "Plugin.Cortex_services_enable" false + + echo Change number of workers + if [ ! -z "$WORKERS" ] && [ "$WORKERS" -gt "1" ]; then + sed -i "s/start --interval/start -n $WORKERS --interval/" /var/www/MISP/app/Console/worker/start.sh + fi } init_misp_files(){ From a71257a7c2c1c8511fd122c5d216d319e5c43319 Mon Sep 17 00:00:00 2001 From: "E. Balsa" Date: Tue, 20 Apr 2021 09:21:21 +0200 Subject: [PATCH 3/3] Add missing sudo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8a2cc97..6d6fe0f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ env: before_install: - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` | sudo tee /usr/local/bin/docker-compose >/dev/null - - chmod +x /usr/local/bin/docker-compose + - sudo chmod +x /usr/local/bin/docker-compose script: - docker-compose -f docker-compose.yml -f build-docker-compose.yml build