2024-12-19 08:26:13 +01:00
|
|
|
ARG PHP_IMAGE_VERSION=3.20.6
|
2024-12-30 16:49:22 +01:00
|
|
|
FROM git.h2-invent.com/public-system-design/alpine-php8-webserver:${PHP_IMAGE_VERSION} AS builder
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
node \
|
|
|
|
npm \
|
|
|
|
git \
|
|
|
|
composer \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
RUN npm install \
|
|
|
|
&& npm run build
|
|
|
|
|
|
|
|
RUN mv /etc/php8/conf.d/custom.ini /etc/php8/custom.ini \
|
|
|
|
&& php -d memory_limit=-1 \
|
|
|
|
composer.phar install \
|
|
|
|
--optimize-autoloader \
|
|
|
|
--no-interaction \
|
|
|
|
--no-progress \
|
|
|
|
--no-dev \
|
|
|
|
&& mv /etc/php8/custom.ini /etc/php8/conf.d/custom.ini
|
|
|
|
|
|
|
|
RUN rm -rf node_modules \
|
|
|
|
&& rm -r var/log \
|
|
|
|
&& rm -r var/cache
|
|
|
|
|
|
|
|
RUN zip -r archive.zip .
|
|
|
|
|
|
|
|
ARG PHP_IMAGE_VERSION=3.20.6
|
|
|
|
FROM git.h2-invent.com/public-system-design/alpine-php8-webserver:${PHP_IMAGE_VERSION} AS builder
|
2024-12-19 08:26:13 +01:00
|
|
|
|
|
|
|
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 <support@h2-invent.com>" \
|
|
|
|
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 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
|
|
|
|
|
2024-12-30 16:49:22 +01:00
|
|
|
COPY --from=builder archive.zip .
|
|
|
|
|
|
|
|
RUN unzip archive.zip \
|
|
|
|
&& rm archive.zip \
|
2024-12-19 08:26:13 +01:00
|
|
|
&& 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
|