2024-11-15 19:56:18 +01:00
|
|
|
FROM erseco/alpine-php-webserver:3.20.5
|
|
|
|
|
|
|
|
ARG VERSION=
|
|
|
|
ARG WEBDIR=/var/www/html
|
|
|
|
|
|
|
|
LABEL version="${VERSION}" \
|
|
|
|
Maintainer="H2 invent GmbH" \
|
|
|
|
Description="Docker Image der Anwendung Jitsi Admin" \
|
|
|
|
org.opencontainers.version="${VERSION}" \
|
|
|
|
org.opencontainers.image.title="Jitsi Admin" \
|
|
|
|
org.opencontainers.image.license="AGPLv3" \
|
|
|
|
org.opencontainers.image.vendor="H2 invent GmbH" \
|
|
|
|
org.opencontainers.image.authors="Emanuel Holzmann <support@h2-invent.com>" \
|
|
|
|
org.opencontainers.image.source="https://github.com/h2-invent/jitsi-admin" \
|
|
|
|
org.opencontainers.image.documentation="https://meetling.de" \
|
|
|
|
org.opencontainers.image.url="https://jitsi-admin.de"
|
|
|
|
|
|
|
|
USER root
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
unzip \
|
|
|
|
sqlite \
|
|
|
|
cronie \
|
|
|
|
libcap \
|
|
|
|
php83-sqlite3 \
|
|
|
|
php83-pdo_sqlite
|
|
|
|
|
|
|
|
RUN mkdir /etc/service/crond \
|
|
|
|
&& echo "#!/bin/sh -e" > /etc/service/crond/run \
|
|
|
|
&& echo "exec 2>&1 /usr/sbin/crond -f" >> /etc/service/crond/run \
|
|
|
|
&& chown -R nobody:nobody /etc/service/crond \
|
|
|
|
&& chmod -R +x /etc/service/crond \
|
|
|
|
&& chown nobody:nobody /usr/sbin/crond \
|
|
|
|
&& setcap cap_setgid=ep /usr/sbin/crond \
|
|
|
|
&& setcap cap_setuid=ep /usr/sbin/crond
|
|
|
|
|
|
|
|
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 mkdir /etc/service/symfony_messenger \
|
|
|
|
&& echo "#!/bin/sh -e" > /etc/service/symfony_messenger/run \
|
|
|
|
&& echo "exec 2>&1 php -d memory_limit=-1 ${WEBDIR}/bin/console messenger:consume async --memory-limit=512m --env=prod" >> /etc/service/symfony_messenger/run \
|
|
|
|
&& chown -R nobody:nobody /etc/service/symfony_messenger \
|
|
|
|
&& chmod -R +x /etc/service/symfony_messenger
|
|
|
|
|
|
|
|
RUN echo "# Docker Cron Jobs" > /etc/crontabs/nobody \
|
|
|
|
&& echo "* * * * * curl http://localhost:8080/health/check" >> /etc/crontabs/nobody \
|
|
|
|
&& echo "* * * * * /bin/sh /distributed_cron.sh '${WEBDIR}/data/cron_log' 'php ${WEBDIR}/bin/console cron:run' >/dev/null 2>&1" >> /etc/crontabs/nobody \
|
|
|
|
&& chown nobody:nobody /etc/crontabs/nobody \
|
|
|
|
&& chmod +x /etc/crontabs/nobody
|
|
|
|
|
2024-11-16 13:04:10 +01:00
|
|
|
RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/02-symfony.sh \
|
|
|
|
&& echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/02-symfony.sh \
|
|
|
|
&& echo "php ${WEBDIR}/bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/02-symfony.sh \
|
|
|
|
&& echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/02-symfony.sh \
|
|
|
|
&& echo "#!/bin/sh" > /docker-entrypoint-init.d/03-theme.sh \
|
|
|
|
&& echo "if [ -d "${WEBDIR}/theme/public" ]; then" >> /docker-entrypoint-init.d/03-theme.sh \
|
|
|
|
&& echo " cp -r ${WEBDIR}/theme/public/* ${WEBSIR}/public/" >> /docker-entrypoint-init.d/03-theme.sh \
|
|
|
|
&& echo "fi" >> /docker-entrypoint-init.d/03-theme.sh \
|
2024-11-15 19:56:18 +01:00
|
|
|
&& chmod +x /docker-entrypoint-init.d/*
|
|
|
|
|
|
|
|
RUN wget https://github.com/H2-invent/jitsi-admin/releases/download/${VERSION}/application.zip -O artifact.zip \
|
|
|
|
&& unzip artifact.zip -d ${WEBDIR} \
|
|
|
|
&& chown -R nobody ${WEBDIR}/public \
|
|
|
|
&& chown -R nobody ${WEBDIR}/var \
|
|
|
|
&& chmod -R 700 ${WEBDIR}/public \
|
|
|
|
&& chmod -R 700 ${WEBDIR}/var
|
|
|
|
|
|
|
|
RUN apk del unzip \
|
|
|
|
&& rm artifact.zip \
|
|
|
|
&& rm -r ${WEBDIR}/var/cache \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
USER nobody
|
|
|
|
|
|
|
|
ENV nginx_root_directory=/var/www/html/public \
|
2024-11-15 08:28:15 +01:00
|
|
|
upload_max_filesize=10M
|