From 20d592684b230bc9411d0cb21f9a74440c70d8d1 Mon Sep 17 00:00:00 2001 From: Daniel Del Rio Figueira Date: Mon, 8 Mar 2021 11:51:29 +0100 Subject: [PATCH] Changed: fix non root supervisord cron configuration file --- conf/supervisor/cron.conf.rootless | 2 +- debian/Dockerfile.rootless | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/supervisor/cron.conf.rootless b/conf/supervisor/cron.conf.rootless index d2b105d..b11f152 100644 --- a/conf/supervisor/cron.conf.rootless +++ b/conf/supervisor/cron.conf.rootless @@ -1,5 +1,5 @@ [program:cron] -command=/usr/local/bin/supercronic /etc/cron.d/passbolt-ce-server +command=/usr/local/bin/supercronic /etc/cron.d/__PASSBOLT_PACKAGE__ autostart=true priority=20 stdout_logfile=/dev/stdout diff --git a/debian/Dockerfile.rootless b/debian/Dockerfile.rootless index bd80beb..0ca7e99 100644 --- a/debian/Dockerfile.rootless +++ b/debian/Dockerfile.rootless @@ -16,6 +16,7 @@ ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v${ SUPERCRONIC=supercronic-linux-${SUPERCRONIC_ARCH} \ SUPERCRONIC_SHA1SUM=048b95b48b708983effb2e5c935a1ef8483d9e3e + RUN apt-get update \ && DEBIAN_FRONTEND=non-interactive apt-get -y install \ ca-certificates \ @@ -34,6 +35,8 @@ RUN apt-get update \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic +COPY conf/supervisor/cron.conf.rootless /etc/supervisor/conf.d/cron.conf + RUN sed -i 's,listen 80;,listen 8080;,' /etc/nginx/sites-enabled/nginx-passbolt.conf \ && rm /etc/nginx/sites-enabled/default \ && cp /usr/share/passbolt/examples/nginx-passbolt-ssl.conf /etc/nginx/snippets/passbolt-ssl.conf \ @@ -66,9 +69,9 @@ RUN sed -i 's,listen 80;,listen 8080;,' /etc/nginx/sites-enabled/nginx-passbolt. && chown -R www-data:0 /var/log/supervisor \ && touch /var/www/.profile \ && chown www-data:www-data /var/www/.profile \ - && sed -i 's,www-data\s,,' /etc/cron.d/$PASSBOLT_PKG + && sed -i 's,www-data\s,,' /etc/cron.d/$PASSBOLT_PKG \ + && sed -i "s,__PASSBOLT_PACKAGE__,$PASSBOLT_PKG," /etc/supervisor/conf.d/cron.conf -COPY conf/supervisor/cron.conf.rootless /etc/supervisor/conf.d/cron.conf COPY conf/supervisor/nginx.conf /etc/supervisor/conf.d/nginx.conf COPY conf/supervisor/php.conf /etc/supervisor/conf.d/php.conf COPY debian/bin/docker-entrypoint.sh.rootless /docker-entrypoint.sh