Compare commits

...

33 commits

Author SHA1 Message Date
74858d3577 Merge pull request 'update odc' (#14) from hotfix/odc-secretStorage-Permission into main
Reviewed-on: #14
2024-12-11 09:55:53 +01:00
9d6d6748ac update odc 2024-12-11 09:55:25 +01:00
d66e9e707b Merge pull request 'update dockerfile for odc' (#13) from hotfix/odc-secretStorage-Permission into main
Reviewed-on: #13
2024-12-11 09:40:59 +01:00
578f83b409 update dockerfile for odc 2024-12-11 09:37:38 +01:00
b11c008c7f Merge pull request 'add data directory with permission' (#12) from hotfix/add-data-directory into main
Reviewed-on: #12
Reviewed-by: emanuel.holzmann <emanuel.holzmann@noreply.localhost>
2024-12-08 16:45:52 +01:00
3e251ada34 change to chmod 2024-12-08 16:45:18 +01:00
0d3eea9d55 add data directory with permission 2024-12-08 16:43:30 +01:00
92795d3494 Merge pull request 'OEM und STATS image' (#11) from feature/oem-image into main
Reviewed-on: #11
Reviewed-by: emanuel.holzmann <emanuel.holzmann@noreply.localhost>
2024-12-03 22:30:45 +01:00
fc77db782d increase memory limit 2024-12-03 22:18:51 +01:00
f390756fca fix memory 2024-12-03 22:07:54 +01:00
913fe42c72 add options 2024-12-03 21:54:50 +01:00
8414d282ec remove node_modules 2024-12-03 21:33:57 +01:00
382ef8ea63 add stats image 2024-12-03 21:20:10 +01:00
7c77be8878 update 2024-12-03 20:41:03 +01:00
05d9e5c69d fix permission 2024-12-03 20:35:23 +01:00
ae68fca0a8 fix run 2024-12-03 20:31:52 +01:00
3cbbbec88b update permissions 2024-12-03 20:27:05 +01:00
3e1bbd0d99 update 2024-12-03 19:33:58 +01:00
074807aabd update 2024-12-03 19:32:17 +01:00
1e9f3bafb1 update git 2024-12-03 18:51:52 +01:00
723fbfb511 unlimited memory 2024-12-03 18:47:44 +01:00
bc99491f6f update composer 2024-12-03 18:44:27 +01:00
04024bf878 update 2024-12-03 18:42:53 +01:00
f6a035838b update 2024-12-03 18:38:43 +01:00
80ce79abb3 add oem image 2024-12-03 18:02:14 +01:00
9161c8896f Merge pull request 'remove command fos_js_routing' (#10) from holzi1005-patch-6 into main
Reviewed-on: #10
Reviewed-by: emanuel.holzmann <emanuel.holzmann@noreply.localhost>
2024-11-29 13:56:36 +01:00
9e3eaae1d7 remove command fos_js_routing 2024-11-29 13:55:23 +01:00
3b32d87d58 Merge pull request 'fix js_route permission' (#9) from holzi1005-patch-5 into main
Reviewed-on: #9
Reviewed-by: emanuel.holzmann <emanuel.holzmann@noreply.localhost>
2024-11-28 16:54:06 +01:00
23c23f554e fix js_route permission 2024-11-28 16:51:31 +01:00
9abcb5eb0c Merge pull request 'add new command for init container' (#8) from holzi1005-patch-4 into main
Reviewed-on: #8
Reviewed-by: emanuel.holzmann <emanuel.holzmann@noreply.localhost>
2024-11-28 16:10:53 +01:00
ad82f9115b add new command for init container 2024-11-28 16:05:07 +01:00
6c5b381d8b Merge pull request 'add complete command fix caching app:statistik:generate' (#7) from holzi1005-patch-4 into main
Reviewed-on: #7
Reviewed-by: emanuel.holzmann <emanuel.holzmann@noreply.localhost>
2024-11-27 22:31:49 +01:00
95f8095890 add complete command fix caching app:statistik:generate 2024-11-27 22:28:21 +01:00
7 changed files with 168 additions and 17 deletions

View file

@ -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

View file

@ -74,11 +74,14 @@ RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/03-symfony.sh \
RUN wget https://github.com/H2-invent/jitsi-admin/releases/download/${VERSION}/application.zip -O artifact.zip \
&& unzip artifact.zip \
&& mkdir data \
&& chown -R nobody public \
&& chown -R nobody theme \
&& chown -R nobody data \
&& chown -R nobody var \
&& chmod -R 700 public \
&& chmod -R 700 theme \
&& chmod -R 700 data \
&& chmod -R 700 var \
&& rm artifact.zip \
&& rm -r var/cache

View file

@ -18,7 +18,13 @@ LABEL version="${VERSION}" \
USER root
RUN apk --no-cache add \
unzip
unzip \
&& rm -rf /var/cache/apk/*
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 cache:warmup" >> /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 \
@ -32,10 +38,8 @@ RUN --mount=type=secret,id=ARTIFACT_USER \
&& chown -R nobody var \
&& chmod -R 700 public \
&& chmod -R 700 var \
&& rm artifact.zip
RUN rm -r var/cache \
&& rm -rf /var/cache/apk/*
&& rm artifact.zip \
&& rm -r var/cache
USER nobody

View file

@ -55,19 +55,14 @@ RUN echo "#!/bin/sh" > /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
USER nobody
RUN wget https://github.com/H2-invent/open-datenschutzcenter/releases/download/${VERSION}/application.zip -O artifact.zip \
&& unzip artifact.zip \
&& chown -R nobody public \
&& chown -R nobody var \
&& chmod -R 700 public \
&& chmod -R 700 var
&& mkdir data
RUN apk del unzip \
&& rm artifact.zip \
&& rm -r var/cache \
&& rm -rf /var/cache/apk/*
USER nobody
RUN rm artifact.zip \
&& rm -r var/cache
ENV nginx_root_directory=/var/www/html/public \
upload_max_filesize=10M \

View file

@ -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 <support@h2-invent.com>" \
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

View file

@ -43,7 +43,7 @@ RUN mkdir /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:stats" >> /var/crontab \
&& echo "*/10 * * * * php /var/www/html/bin/console app:statistik:generate" >> /var/crontab \
&& echo "" >> /var/crontab \
&& chown nobody:nobody /var/crontab

View file

@ -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 <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 \
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