mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 14:42:01 -03:30
010lamp: clear opcache on container startup
- Dockerfile: Set apache configuration environment variables - library.sh: Only retry setting up notify_push on failure Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
56e1ff45ee
commit
41a7b6b373
@ -28,6 +28,12 @@ LABEL maintainer="Ignacio Núñez Hernanz <nacho@ownyourbits.com>"
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
ENV DOCKERBUILD 1
|
||||
ENV APACHE_RUN_USER=www-data
|
||||
ENV APACHE_RUN_GROUP=www-data
|
||||
ENV APACHE_LOG_DIR=/var/log/apache2
|
||||
ENV APACHE_LOCK_DIR=/var/lock/apache2
|
||||
ENV APACHE_PID_FILE=/var/run/apache2.pid
|
||||
ENV APACHE_RUN_DIR=/var/run/apache2
|
||||
|
||||
COPY etc/ncp.cfg etc/library.sh lamp.sh /usr/local/etc/
|
||||
COPY etc/ncp-templates /usr/local/etc/ncp-templates
|
||||
@ -147,7 +153,7 @@ COPY etc/ncp-config.d/nc-init.cfg /usr/local/etc/ncp-config.d/nc-init-copy.cfg
|
||||
COPY etc/ncp-config.d/nc-datadir.cfg /usr/local/etc/ncp-config.d/nc-datadir-copy.cfg
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
|
||||
set -e; \
|
||||
set -ex; \
|
||||
|
||||
# make sure we don't accidentally disable first run wizard
|
||||
rm -f ncp-web/{wizard.cfg,ncp-web.cfg}; \
|
||||
|
||||
@ -26,6 +26,7 @@ if [[ -f /usr/local/bin/ncp-docker-hook ]]; then
|
||||
fi
|
||||
|
||||
echo "Starting PHP-fpm"
|
||||
clear_opcache
|
||||
php-fpm"${PHPVER}"
|
||||
|
||||
echo "Starting Apache"
|
||||
|
||||
@ -162,7 +162,7 @@ function set-nc-domain()
|
||||
for try in {1..5}
|
||||
do
|
||||
echo "Setup notify_push (attempt ${try}/5)"
|
||||
ncc notify_push:setup "${url}/push"
|
||||
ncc notify_push:setup "${url}/push" && break
|
||||
sleep 10
|
||||
done
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user