diff --git a/migrate_non_root.sh b/migrate_non_root.sh new file mode 100755 index 00000000..29bf05b4 --- /dev/null +++ b/migrate_non_root.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# if [[ ! -z $(docker ps -q) ]]; then +# exit 1 +# fi + +mkdir -p /opt/node/volumes/liquid/core/var +mkdir -p /opt/node/volumes/snoop/blobs + +chown -R 666:666 /opt/node/volumes/liquid/core/var +chown -R 666:666 /opt/node/volumes/snoop/blobs diff --git a/templates/authdemo.nomad b/templates/authdemo.nomad index 80fbe4b9..8392f26f 100644 --- a/templates/authdemo.nomad +++ b/templates/authdemo.nomad @@ -7,6 +7,7 @@ job "authdemo" { group "demo" { task "app" { driver = "docker" + user = 666 config { image = "${config.image('liquid-authproxy')}" args = ["./testapp.py"] diff --git a/templates/hoover-workers.nomad b/templates/hoover-workers.nomad index 7ca2fac6..448fc5aa 100644 --- a/templates/hoover-workers.nomad +++ b/templates/hoover-workers.nomad @@ -23,6 +23,7 @@ job "hoover-workers" { } driver = "docker" + # user = 666 config { image = "${config.image('hoover-snoop2')}" args = ["sh", "/local/startup.sh"] diff --git a/templates/hoover.nomad b/templates/hoover.nomad index fd00c480..68b7fd64 100644 --- a/templates/hoover.nomad +++ b/templates/hoover.nomad @@ -19,7 +19,7 @@ job "hoover" { } driver = "docker" - + #user = 666 config { image = "${config.image('hoover-search')}" args = ["sh", "/local/startup.sh"] @@ -148,6 +148,7 @@ job "hoover" { ${ task_logs() } driver = "docker" + # user = 666 config { image = "${config.image('hoover-snoop2')}" args = ["sh", "/local/startup.sh"] @@ -241,6 +242,7 @@ job "hoover" { ${ task_logs() } driver = "docker" + # user = 666 config { image = "${config.image('hoover-snoop2')}" args = ["sh", "/local/startup.sh"] @@ -322,6 +324,7 @@ job "hoover" { } driver = "docker" + # user = 666 config { image = "${config.image('hoover-snoop2')}" args = ["sh", "/local/startup.sh"] @@ -331,7 +334,8 @@ job "hoover" { "{% raw %}${meta.liquid_volumes}{% endraw %}/snoop/blobs:/opt/hoover/snoop/blobs", ] port_map { - http = 80 + http = 8080 + # http = 80 } labels { liquid_task = "snoop-api" @@ -357,7 +361,7 @@ job "hoover" { ./manage.py healthcheck date if [[ "$DEBUG" == "true" ]]; then - exec ./manage.py runserver 0.0.0.0:80 + exec ./manage.py runserver 0.0.0.0:8080 else exec /runserver fi diff --git a/templates/liquid.nomad b/templates/liquid.nomad index 6664317f..507a8687 100644 --- a/templates/liquid.nomad +++ b/templates/liquid.nomad @@ -19,12 +19,34 @@ job "liquid" { } driver = "docker" + # user = 666 config { image = "${config.image('liquid-core')}" + # args = ["/bin/sleep", "1000"] volumes = [ ${liquidinvestigations_core_repo} "{% raw %}${meta.liquid_volumes}{% endraw %}/liquid/core/var:/app/var", ] + #mounts = [ + #{ + # type = "volume" + # target = "/app/var" + # source = "{% raw %}${meta.liquid_volumes}{% endraw %}/liquid/core/var" + # # source = "test_core" + # readonly = false + #} + #] + #mounts = [ + #{ + # type = "bind" + # target = "/app/var" + # source = ${liquidinvestigations_core_repo}"{% raw %}${meta.liquid_volumes}{% endraw %}/liquid/core/var" + # readonly = false + # bind_options { + # propagation = "rshared" + # } + #} + #] labels { liquid_task = "liquid-core" } diff --git a/versions.ini b/versions.ini index f10e2fb2..999eabc7 100644 --- a/versions.ini +++ b/versions.ini @@ -2,12 +2,15 @@ codimd = liquidinvestigations/codimd-server:0.2.1 h-client = liquidinvestigations/h-client:0.1.1 hoover-search = liquidinvestigations/hoover-search:0.6.0 +# hoover-search = liquidinvestigations/hoover-search:non-root-user-v1 #hoover-snoop2 = liquidinvestigations/hoover-snoop2:file-model-view hoover-snoop2 = liquidinvestigations/hoover-snoop2:0.11.2 +# hoover-snoop2 = liquidinvestigations/hoover-snoop2:non-root-user-v1 #hoover-ui = liquidinvestigations/hoover-ui:enable-tree-view-update hoover-ui = liquidinvestigations/hoover-ui:0.3.0 hypothesis-h = liquidinvestigations/hypothesis-h:0.2.1 liquid-authproxy = liquidinvestigations/oauth-proxy:0.0.2 liquid-core = liquidinvestigations/core:0.4.1 +# liquid-core = liquidinvestigations/core:non-root-user-v1 liquid-dokuwiki = liquidinvestigations/liquid-dokuwiki:0.1.0 liquid-nextcloud = liquidinvestigations/liquid-nextcloud:0.2.3