develop #13

Merged
glenux merged 9 commits from develop into master 2025-01-12 14:33:42 +00:00
6 changed files with 39 additions and 9 deletions

View file

@ -24,7 +24,8 @@ steps:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
cache_from: "glenux/service-nextcloud:latest_${DRONE_BRANCH/\\//-}"
cache_from:
- "glenux/service-nextcloud:${DRONE_BRANCH/\\//-}_latest"
repo: glenux/service-nextcloud
tags: "${DRONE_COMMIT_SHA:0:8}"
purge: false
@ -43,9 +44,9 @@ steps:
from_secret: DOCKERHUB_PASSWORD
cache_from:
- "glenux/service-nextcloud:${DRONE_COMMIT_SHA:0:8}"
- "glenux/service-nextcloud:latest_${DRONE_BRANCH/\\//-}"
- "glenux/service-nextcloud:${DRONE_BRANCH/\\//-}_latest"
repo: glenux/service-nextcloud
tags: "latest_${DRONE_BRANCH/\\//-}"
tags: "${DRONE_BRANCH/\\//-}_latest"
purge: false
when:
branch:
@ -64,7 +65,7 @@ steps:
from_secret: DOCKERHUB_PASSWORD
cache_from:
- "glenux/service-nextcloud:${DRONE_COMMIT_SHA:0:8}"
- "glenux/service-nextcloud:latest_${DRONE_BRANCH/\\//-}"
- "glenux/service-nextcloud:${DRONE_BRANCH/\\//-}_latest"
repo: glenux/service-nextcloud
tags: latest
purge: false

View file

@ -17,15 +17,19 @@
# FROM nextcloud:27.1.3-apache
# FROM nextcloud:27.1.4-apache
# FROM nextcloud:28.0.1-apache
FROM nextcloud:29.0.3-apache
# FROM nextcloud:29.0.3-apache
# FROM nextcloud:29.0.7-apache
FROM nextcloud:30.0.4-apache
# This is a stupid comment for a demo (remove later)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
clamdscan nano ghostscript jq \
nano ghostscript \
&& apt-get clean
# clamdscan
#
## Enable REDIS extension
# RUN pecl channel-update pecl.php.net \
@ -86,6 +90,11 @@ RUN echo '[opcache]' > /usr/local/etc/php/conf.d/opcache.ini \
&& echo '[PHP]' > /usr/local/etc/php/conf.d/memory-limit.ini \
&& echo 'memory_limit=1024M' >> /usr/local/etc/php/conf.d/memory-limit.ini
COPY php-uploads.ini /usr/local/etc/php/conf.d/glenux-uploads.ini
COPY php-performance.ini /usr/local/etc/php/conf.d/glenux-performance.ini
COPY php-errors.ini /usr/local/etc/php/conf.d/glenux-errors.ini
RUN echo "LimitRequestBody 0" > /etc/apache2/conf-enabled/nextcloud-fix-413-error.conf
##
## CRON SETUP
##

View file

@ -18,9 +18,10 @@ cd "$WORKDIR" || exit 1
echo "GX:BEFORE-STARTING:START ($(pwd))"
# find . -maxdepth 1
echo "GX:BEFORE-STARTING:STATUS"
INSTALLED="$(php -d memory_limit=-1 occ status |jq -r '.installed')"
if [ "$INSTALLED" != "true" ]; then
echo "WARNING: Not installed yet. Exiting."
php -d memory_limit=-1 occ status
# INSTALLED="$(php -d memory_limit=-1 occ status |jq -r '.installed')"
if php -d memory_limit=-1 occ status 2>&1 | grep -q 'not installed' ; then
echo "WARNING: Nextcloud is not installed yet. Exiting."
exit 0
fi

11
php-errors.ini Normal file
View file

@ -0,0 +1,11 @@
error_reporting = E_ALL & ~E_WARNING & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
log_errors = On
## For production
# display_errors = Off
# error_log = /dev/stderr
## For debugging
display_errors = On
error_log = /var/log/php-errors.log

3
php-performance.ini Normal file
View file

@ -0,0 +1,3 @@
; Maximum amount of memory a script may consume (64MB)
memory_limit = 256M
max_input_vars = 3000

5
php-uploads.ini Normal file
View file

@ -0,0 +1,5 @@
file_uploads = On
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 1200
max_input_time = 120