Merge pull request 'hotfix/skib-update' (#21) from hotfix/skib-update into main
Reviewed-on: #21
This commit is contained in:
commit
1574e0fe86
1 changed files with 10 additions and 34 deletions
|
@ -1,8 +1,5 @@
|
|||
ARG PHP_IMAGE_VERSION=3.20.6
|
||||
FROM erseco/alpine-php-webserver:${PHP_IMAGE_VERSION}
|
||||
|
||||
ARG VERSION
|
||||
ARG SUPERCRONIC_VERSION=0.2.33
|
||||
FROM git.h2-invent.com/public-system-design/alpine-php8-cron-webserver:3.20.7
|
||||
ARG VERSION=development
|
||||
|
||||
LABEL version="${VERSION}" \
|
||||
Maintainer="H2 invent GmbH" \
|
||||
|
@ -30,18 +27,6 @@ RUN apk --no-cache add \
|
|||
|
||||
RUN echo "Europe/Berlin" > /etc/timezone
|
||||
|
||||
RUN wget https://github.com/aptible/supercronic/releases/download/v${SUPERCRONIC_VERSION}/supercronic-linux-amd64 -O /supercronic \
|
||||
&& chmod +x /supercronic
|
||||
|
||||
RUN wget https://git.h2-invent.com/Public-System-Design/Public-Helperscripts/raw/branch/main/distributed_cron.sh -O /distributed_cron.sh \
|
||||
&& chmod +x /distributed_cron.sh
|
||||
|
||||
RUN mkdir /etc/service/cron \
|
||||
&& echo "#!/bin/sh" > /etc/service/cron/run \
|
||||
&& echo "exec 2>&1 /supercronic /var/crontab" >> /etc/service/cron/run \
|
||||
&& chown -R nobody:nobody /etc/service/cron \
|
||||
&& chmod -R +x /etc/service/cron
|
||||
|
||||
RUN echo "# Docker Cron Jobs" > /var/crontab \
|
||||
&& echo "*/10 * * * * php /var/www/html/bin/console app:statistik:generate" >> /var/crontab \
|
||||
&& echo "" >> /var/crontab \
|
||||
|
@ -53,26 +38,17 @@ RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/02-symfony.sh \
|
|||
&& echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/02-symfony.sh \
|
||||
&& chmod +x /docker-entrypoint-init.d/02-symfony.sh
|
||||
|
||||
RUN --mount=type=secret,id=ARTIFACT_USER \
|
||||
--mount=type=secret,id=ARTIFACT_SECRET \
|
||||
--mount=type=secret,id=ARTIFACT_URL \
|
||||
ARTIFACT_USER=$(cat /run/secrets/ARTIFACT_USER) \
|
||||
ARTIFACT_SECRET=$(cat /run/secrets/ARTIFACT_SECRET) \
|
||||
ARTIFACT_URL=$(cat /run/secrets/ARTIFACT_URL) \
|
||||
&& wget https://${ARTIFACT_USER}:${ARTIFACT_SECRET}@${ARTIFACT_URL}-${VERSION}.zip -O artifact.zip \
|
||||
&& unzip artifact.zip \
|
||||
&& chown -R nobody public \
|
||||
&& chown -R nobody var \
|
||||
&& chmod -R 700 public \
|
||||
&& chmod -R 700 var
|
||||
|
||||
RUN rm artifact.zip \
|
||||
&& rm -r var/cache
|
||||
|
||||
USER nobody
|
||||
|
||||
RUN wget https://github.com/H2-invent/skib-unsere-schulkindbetreuung/releases/download/${VERSION}/artifact.zip -O artifact.zip \
|
||||
&& unzip artifact.zip \
|
||||
&& mkdir data \
|
||||
&& mkdir -p var/log \
|
||||
&& mkdir -p var/cache \
|
||||
&& rm artifact.zip
|
||||
|
||||
ENV nginx_root_directory=/var/www/html/public \
|
||||
memory_limit=1024M \
|
||||
post_max_size=20M \
|
||||
upload_max_filesize=10M \
|
||||
date_timezone=Europe/Berlin
|
||||
date_timezone=Europe/Berlin
|
||||
|
|
Loading…
Add table
Reference in a new issue