add stats image
This commit is contained in:
parent
7c77be8878
commit
382ef8ea63
1 changed files with 56 additions and 0 deletions
56
stats_application_dockerfile
Normal file
56
stats_application_dockerfile
Normal file
|
@ -0,0 +1,56 @@
|
|||
ARG PHP_IMAGE_VERSION=3.20.6
|
||||
FROM erseco/alpine-php-webserver:${PHP_IMAGE_VERSION}
|
||||
|
||||
ARG VERSION
|
||||
|
||||
LABEL version="${VERSION}" \
|
||||
Maintainer="H2 invent GmbH" \
|
||||
Description="Stats Server" \
|
||||
org.opencontainers.version="${VERSION}" \
|
||||
org.opencontainers.image.title="Stats Server" \
|
||||
org.opencontainers.image.license="AGPLv3" \
|
||||
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/ja-analystics" \
|
||||
org.opencontainers.image.documentation="https://h2-invent.com" \
|
||||
org.opencontainers.image.url="https://h2-invent.com"
|
||||
|
||||
USER root
|
||||
|
||||
RUN apk --no-cache add \
|
||||
git \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/01-symfony.sh \
|
||||
&& echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \
|
||||
&& echo "php bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/01-symfony.sh \
|
||||
&& echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \
|
||||
&& chmod +x /docker-entrypoint-init.d/01-symfony.sh
|
||||
|
||||
RUN wget https://github.com/H2-invent/ja-analytics/archive/refs/heads/main.tar.gz -O artifact.tar.gz \
|
||||
&& tar --strip-components=1 -xvzf artifact.tar.gz \
|
||||
&& chown -R nobody public \
|
||||
&& chmod -R 700 public
|
||||
|
||||
RUN mv /etc/php83/conf.d/custom.ini /etc/php83/custom.ini
|
||||
|
||||
RUN php -d memory_limit=-1 \
|
||||
composer.phar install \
|
||||
--optimize-autoloader \
|
||||
--no-interaction \
|
||||
--no-progress \
|
||||
--no-dev
|
||||
|
||||
RUN mv /etc/php83/custom.ini /etc/php83/conf.d/custom.ini
|
||||
|
||||
RUN rm -r node_modules \
|
||||
&& rm artifact.tar.gz \
|
||||
&& rm -r var/cache \
|
||||
&& chown -R nobody var
|
||||
|
||||
USER nobody
|
||||
|
||||
ENV nginx_root_directory=/var/www/html/public \
|
||||
upload_max_filesize=10M \
|
||||
date_timezone=Europe/Berlin \
|
||||
intl_default_locale=de_DE
|
Loading…
Reference in a new issue