From 8451fb2b2db80e2513373e35fa043b7bf4a32adb Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 21 Jan 2024 22:30:57 +0100 Subject: [PATCH] Add missing Devel::StackTrace and use minit as PID1 --- example/images/lemonldap-ng/Dockerfile | 6 ++++-- example/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml | 5 +++++ example/lemonldap-ng.nomad.hcl | 4 ++-- images/lemonldap-ng/Dockerfile | 4 +++- images/lemonldap-ng/root/etc/minit.d/entrypoint.yml | 5 +++++ lemonldap-ng.nomad.hcl | 2 +- variables.yml | 2 +- 7 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 example/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml create mode 100644 images/lemonldap-ng/root/etc/minit.d/entrypoint.yml diff --git a/example/images/lemonldap-ng/Dockerfile b/example/images/lemonldap-ng/Dockerfile index d2704bf..03bf541 100644 --- a/example/images/lemonldap-ng/Dockerfile +++ b/example/images/lemonldap-ng/Dockerfile @@ -1,4 +1,4 @@ -FROM danielberteaud/alma:9.24.1-5 +FROM danielberteaud/alma:9.24.1-6 MAINTAINER Daniel Berteaud ARG LLNG_VERSION=2.18.1 @@ -29,6 +29,7 @@ RUN set -eux &&\ uwsgi-plugin-psgi \ lasso \ lasso-perl \ + perl-Devel-StackTrace \ perl-DBD-Pg \ perl-Cache-Cache \ perl-Apache-Session-Browseable \ @@ -50,4 +51,5 @@ RUN set -eux &&\ COPY root/ / USER apache -CMD ["minit"] +ENTRYPOINT ["minit"] +CMD [] diff --git a/example/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml b/example/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml new file mode 100644 index 0000000..32269a6 --- /dev/null +++ b/example/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml @@ -0,0 +1,5 @@ +--- +kind: once +name: entrypoint +command: ["/entrypoint.sh"] + diff --git a/example/lemonldap-ng.nomad.hcl b/example/lemonldap-ng.nomad.hcl index cb2340f..e86bb46 100644 --- a/example/lemonldap-ng.nomad.hcl +++ b/example/lemonldap-ng.nomad.hcl @@ -82,12 +82,13 @@ job "lemonldap-ng" { driver = "docker" config { - image = "danielberteaud/lemonldap-ng:2.18.1-7" + image = "danielberteaud/lemonldap-ng:2.18.1-8" readonly_rootfs = true pids_limit = 200 volumes = [ "secrets/lemonldap-ng.ini:/etc/lemonldap-ng/lemonldap-ng.ini:ro", "local/init-db.sh:/entrypoint.d/20-initdb.sh:ro", + "local/minit.d/lemonldap-ng.yml:/etc/minit.d/lemonldap-ng.yml:ro" ] mount { type = "tmpfs" @@ -120,7 +121,6 @@ job "lemonldap-ng" { LLNG_MANAGER_VHOST = "manager.example.org" LLNG_PORTAL_VHOST = "sso.example.org" LLNG_CUSTOM_ASSETS_DIR = "/local/assets" - MINIT_UNIT_DIR = "/local/minit.d" } diff --git a/images/lemonldap-ng/Dockerfile b/images/lemonldap-ng/Dockerfile index 5a6a710..f2d0ae6 100644 --- a/images/lemonldap-ng/Dockerfile +++ b/images/lemonldap-ng/Dockerfile @@ -29,6 +29,7 @@ RUN set -eux &&\ uwsgi-plugin-psgi \ lasso \ lasso-perl \ + perl-Devel-StackTrace \ perl-DBD-Pg \ perl-Cache-Cache \ perl-Apache-Session-Browseable \ @@ -50,4 +51,5 @@ RUN set -eux &&\ COPY root/ / USER apache -CMD ["minit"] +ENTRYPOINT ["minit"] +CMD [] diff --git a/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml b/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml new file mode 100644 index 0000000..32269a6 --- /dev/null +++ b/images/lemonldap-ng/root/etc/minit.d/entrypoint.yml @@ -0,0 +1,5 @@ +--- +kind: once +name: entrypoint +command: ["/entrypoint.sh"] + diff --git a/lemonldap-ng.nomad.hcl b/lemonldap-ng.nomad.hcl index 8abed9e..3098d4c 100644 --- a/lemonldap-ng.nomad.hcl +++ b/lemonldap-ng.nomad.hcl @@ -65,6 +65,7 @@ job "[[ .instance ]]" { volumes = [ "secrets/lemonldap-ng.ini:/etc/lemonldap-ng/lemonldap-ng.ini:ro", "local/init-db.sh:/entrypoint.d/20-initdb.sh:ro", + "local/minit.d/lemonldap-ng.yml:/etc/minit.d/lemonldap-ng.yml:ro" ] [[ template "common/tmpfs" dict "size" "5000000" "target" "/tmp" ]] } @@ -79,7 +80,6 @@ job "[[ .instance ]]" { LLNG_MANAGER_VHOST = [[ (urlParse .llng.manager.public_url).Hostname | toJSON ]] LLNG_PORTAL_VHOST = [[ (urlParse .llng.portal.public_url).Hostname | toJSON ]] LLNG_CUSTOM_ASSETS_DIR = "/local/assets" - MINIT_UNIT_DIR = "/local/minit.d" [[ template "common/proxy_env" $c ]] } diff --git a/variables.yml b/variables.yml index 365f1d3..f2c1be5 100644 --- a/variables.yml +++ b/variables.yml @@ -12,7 +12,7 @@ llng: count: 1 # Docker image to use - image: '[[ .docker.repo ]]lemonldap-ng:2.18.1-7' + image: '[[ .docker.repo ]]lemonldap-ng:2.18.1-8' # Resource allocation resources: