From deae4614602fe5a81777a65e0eb5e43db6e9c69b Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Thu, 19 Dec 2024 08:26:13 +0100 Subject: [PATCH] add lem image --- lem_application_dockerfile | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 lem_application_dockerfile diff --git a/lem_application_dockerfile b/lem_application_dockerfile new file mode 100644 index 0000000..81d1445 --- /dev/null +++ b/lem_application_dockerfile @@ -0,0 +1,61 @@ +ARG PHP_IMAGE_VERSION=3.20.6 +FROM git.h2-invent.com/public-system-design/alpine-php8-webserver:${PHP_IMAGE_VERSION} + +ARG VERSION +ARG SUPERCRONIC_VERSION=0.2.33 + +LABEL version="${VERSION}" \ + Maintainer="H2 invent GmbH" \ + Description="Fördermap" \ + org.opencontainers.version="${VERSION}" \ + org.opencontainers.image.title="Fördermap" \ + org.opencontainers.image.license="INTERNAL" \ + org.opencontainers.image.vendor="H2 invent GmbH" \ + org.opencontainers.image.authors="Andreas Holzmann " \ + org.opencontainers.image.source="https://github.com/h2-invent/lem" \ + org.opencontainers.image.documentation="https://fierdermmap.de" \ + org.opencontainers.image.url="https://fierdermmap.de" + +USER root + +RUN apk --no-cache add \ + unzip \ + php83-xmlwriter \ + php83-xsl \ + php83-pcntl \ + php83-posix \ + php83-sockets \ + php83-bcmath \ + && rm -rf /var/cache/apk/* + +RUN echo "Europe/Berlin" > /etc/timezone + +RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/02-symfony.sh \ + && echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/02-symfony.sh \ + && echo "php bin/console doc:mig:mig --no-interaction" >> /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 \ + && rm artifact.zip \ + && chown -R nobody public \ + && chown -R nobody var \ + && chmod -R 700 public \ + && chmod -R 700 var \ + && rm -r var/cache + +USER nobody + +ENV nginx_root_directory=/var/www/html/public \ + memory_limit=1024M \ + post_max_size=20M \ + upload_max_filesize=10M \ + date_timezone=Europe/Berlin \ + intl_default_locale=de_DE \ No newline at end of file -- 2.39.5