From fdef9fa29cd82fb8a7049f13faba5a63925105fe Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sat, 16 Nov 2024 22:39:00 +0100 Subject: [PATCH] Update odc_application_dockerfile.txt --- odc_application_dockerfile.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/odc_application_dockerfile.txt b/odc_application_dockerfile.txt index fbc8f26..b7d4897 100644 --- a/odc_application_dockerfile.txt +++ b/odc_application_dockerfile.txt @@ -35,14 +35,18 @@ RUN echo "# Docker Cron Jobs" > /etc/crontabs/nobody \ && echo "* * * * * curl http://localhost:8080/health/check > /dev/null > 2>&1" >> /etc/crontabs/nobody \ && echo "0 1 * * * curl https://open-datenschutzcenter.de/health/check > /dev/null > 2>&1" >> /etc/crontabs/nobody \ && echo "0 9 * * 1-5 /bin/sh /distributed_cron.sh '${WEBDIR}/data/cron_log' 'php ${WEBDIR}/bin/console app:cron' >/dev/null 2>&1" >> /etc/crontabs/nobody \ - && chown nobody:nobody /etc/crontabs/nobody \ - && chmod +x /etc/crontabs/nobody + && echo "" >> /etc/crontabs/nobody -RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/symfony.sh \ - && echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/symfony.sh \ - && echo "php ${WEBDIR}/bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/symfony.sh \ - && echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/symfony.sh \ - && chmod +x /docker-entrypoint-init.d/* +RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/01-symfony.sh \ + && echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ + && echo "php ${WEBDIR}/bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/01-symfony.sh \ + && echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ + && chmod +x /docker-entrypoint-init.d/01-symfony.sh + +RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/99-crond.sh \ + && echo "# Start crond as daemon via entry script" >> /docker-entrypoint-init.d/99-crond.sh \ + && echo "crond -b -l 8" >> /docker-entrypoint-init.d/99-crond.sh \ + && chmod +x /docker-entrypoint-init.d/99-crond.sh RUN wget https://github.com/H2-invent/open-datenschutzcenter/releases/download/${VERSION}/application.zip -O artifact.zip \ && unzip artifact.zip -d ${WEBDIR} \