diff --git a/filemanager_application_dockerfile b/filemanager_application_dockerfile index af0996d..89defc3 100644 --- a/filemanager_application_dockerfile +++ b/filemanager_application_dockerfile @@ -70,4 +70,5 @@ ENV nginx_root_directory=/var/www/html/public \ memory_limit=1024M \ post_max_size=200M \ upload_max_filesize=200M \ - date_timezone=Europe/Berlin + date_timezone=Europe/Berlin \ + intl_default_locale=de_DE diff --git a/oem_application_dockerfile b/oem_application_dockerfile new file mode 100644 index 0000000..846ae8f --- /dev/null +++ b/oem_application_dockerfile @@ -0,0 +1,86 @@ +FROM git.h2-invent.com/public-system-design/alpine-php7-webserver:main + +ARG VERSION +ARG SUPERCRONIC_VERSION=0.2.33 + +LABEL version="${VERSION}" \ + Maintainer="H2 invent GmbH" \ + Description="Docker Image der Anwendung Open Datenschutzcenter" \ + org.opencontainers.version="${VERSION}" \ + org.opencontainers.image.title="Open Event Manager" \ + org.opencontainers.image.license="Apache-2.0 license" \ + org.opencontainers.image.vendor="H2 invent GmbH" \ + org.opencontainers.image.authors="Andreas Holzmann " \ + org.opencontainers.image.source="https://github.com/h2-invent/open-datenschutzcenter" \ + org.opencontainers.image.documentation="https://open-datenschutzcenter.de" \ + org.opencontainers.image.url="https://open-datenschutzcenter.de" + +USER root + +RUN apk --no-cache add \ + unzip \ + nodejs \ + npm \ + git \ + && rm -rf /var/cache/apk/* + +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 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 echo "# Docker Cron Jobs" > /var/crontab \ + && echo "SHELL=/bin/sh" >> /var/crontab \ + && echo "*/10 * * * * /bin/sh /distributed_cron.sh '/var/www/html/data/cron_lock' 'php /var/www/html/bin/console app:cron'" >> /var/crontab \ + && echo "" >> /var/crontab + +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/open-event-manager/open-event-manager/archive/refs/tags/${VERSION}.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/php7/conf.d/custom.ini /etc/php7/custom.ini + +RUN php -d memory_limit=-1 \ + composer.phar install \ + --optimize-autoloader \ + --no-interaction \ + --no-progress \ + --no-dev + +RUN mv /etc/php7/custom.ini /etc/php7/conf.d/custom.ini + +RUN npm install \ + && npm run build + +RUN apk del \ + unzip \ + nodejs \ + npm \ + git \ + && rm -rf /var/cache/apk/* + +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 diff --git a/stats_application_dockerfile b/stats_application_dockerfile new file mode 100644 index 0000000..9e61b4c --- /dev/null +++ b/stats_application_dockerfile @@ -0,0 +1,62 @@ +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 " \ + 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 \ + php83-xmlwriter \ + php83-xsl \ + php83-pcntl \ + php83-posix \ + php83-sockets \ + && 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 artifact.tar.gz \ + && rm -r var/cache \ + && chown -R nobody var + +USER nobody + +ENV nginx_root_directory=/var/www/html/public \ + memory_limit=2048M \ + post_max_size=20M \ + upload_max_filesize=20M \ + date_timezone=Europe/Berlin \ + intl_default_locale=de_DE