0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-15 19:05:09 +01:00

Merge pull request #9 from nextcloud/master

Merge master back
This commit is contained in:
kgw4it 2019-05-03 16:59:13 +02:00 committed by GitHub
commit 2d115529b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 403 additions and 77 deletions

15
.config/smtp.config.php Normal file
View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -120,7 +120,7 @@ http {
# Adding the cache control header for js and css files # Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block # Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff|svg|gif)$ { location ~ \.(?:css|js|woff2?|svg|gif)$ {
try_files $uri /index.php$request_uri; try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463"; add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to # Add headers to serve security related headers (It is intended to

View file

@ -120,7 +120,7 @@ http {
# Adding the cache control header for js and css files # Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block # Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff|svg|gif)$ { location ~ \.(?:css|js|woff2?|svg|gif)$ {
try_files $uri /index.php$request_uri; try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463"; add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to # Add headers to serve security related headers (It is intended to

View file

@ -120,7 +120,7 @@ http {
# Adding the cache control header for js and css files # Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block # Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff|svg|gif)$ { location ~ \.(?:css|js|woff2?|svg|gif)$ {
try_files $uri /index.php$request_uri; try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463"; add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to # Add headers to serve security related headers (It is intended to

View file

@ -50,13 +50,7 @@ jobs:
- ./generate-stackbrew-library.sh - ./generate-stackbrew-library.sh
- stage: test images - stage: test images
env: VERSION=13.0 VARIANT=fpm-alpine ARCH=amd64 env: VERSION=14.0 VARIANT=fpm-alpine ARCH=amd64
- env: VERSION=13.0 VARIANT=fpm-alpine ARCH=i386
- env: VERSION=13.0 VARIANT=fpm ARCH=amd64
- env: VERSION=13.0 VARIANT=fpm ARCH=i386
- env: VERSION=13.0 VARIANT=apache ARCH=amd64
- env: VERSION=13.0 VARIANT=apache ARCH=i386
- env: VERSION=14.0 VARIANT=fpm-alpine ARCH=amd64
- env: VERSION=14.0 VARIANT=fpm-alpine ARCH=i386 - env: VERSION=14.0 VARIANT=fpm-alpine ARCH=i386
- env: VERSION=14.0 VARIANT=fpm ARCH=amd64 - env: VERSION=14.0 VARIANT=fpm ARCH=amd64
- env: VERSION=14.0 VARIANT=fpm ARCH=i386 - env: VERSION=14.0 VARIANT=fpm ARCH=i386
@ -68,3 +62,9 @@ jobs:
- env: VERSION=15.0 VARIANT=fpm ARCH=i386 - env: VERSION=15.0 VARIANT=fpm ARCH=i386
- env: VERSION=15.0 VARIANT=apache ARCH=amd64 - env: VERSION=15.0 VARIANT=apache ARCH=amd64
- env: VERSION=15.0 VARIANT=apache ARCH=i386 - env: VERSION=15.0 VARIANT=apache ARCH=i386
- env: VERSION=16.0 VARIANT=fpm-alpine ARCH=amd64
- env: VERSION=16.0 VARIANT=fpm-alpine ARCH=i386
- env: VERSION=16.0 VARIANT=fpm ARCH=amd64
- env: VERSION=16.0 VARIANT=fpm ARCH=i386
- env: VERSION=16.0 VARIANT=apache ARCH=amd64
- env: VERSION=16.0 VARIANT=apache ARCH=i386

View file

@ -16,7 +16,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
@ -55,7 +55,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -110,7 +110,7 @@ RUN a2enmod rewrite remoteip ;\
} > /etc/apache2/conf-available/remoteip.conf;\ } > /etc/apache2/conf-available/remoteip.conf;\
a2enconf remoteip a2enconf remoteip
ENV NEXTCLOUD_VERSION 14.0.8 ENV NEXTCLOUD_VERSION 14.0.10
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -12,7 +12,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
apk add --no-cache --virtual .build-deps \ apk add --no-cache --virtual .build-deps \
@ -49,7 +49,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -91,7 +91,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 14.0.8 ENV NEXTCLOUD_VERSION 14.0.10
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \ apk add --no-cache --virtual .fetch-deps \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -16,7 +16,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
@ -55,7 +55,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -102,7 +102,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 14.0.8 ENV NEXTCLOUD_VERSION 14.0.10
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template # DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.2-apache-stretch FROM php:7.3-apache-stretch
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -16,7 +16,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
@ -35,6 +35,7 @@ RUN set -ex; \
libpq-dev \ libpq-dev \
libxml2-dev \ libxml2-dev \
libmagickwand-dev \ libmagickwand-dev \
libzip-dev \
; \ ; \
\ \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
@ -55,7 +56,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -110,7 +111,7 @@ RUN a2enmod rewrite remoteip ;\
} > /etc/apache2/conf-available/remoteip.conf;\ } > /etc/apache2/conf-available/remoteip.conf;\
a2enconf remoteip a2enconf remoteip
ENV NEXTCLOUD_VERSION 15.0.5 ENV NEXTCLOUD_VERSION 15.0.7
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:7.2-fpm-alpine3.9 FROM php:7.3-fpm-alpine3.9
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -12,7 +12,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
apk add --no-cache --virtual .build-deps \ apk add --no-cache --virtual .build-deps \
@ -26,6 +26,7 @@ RUN set -ex; \
libpng-dev \ libpng-dev \
libmemcached-dev \ libmemcached-dev \
libxml2-dev \ libxml2-dev \
libzip-dev \
openldap-dev \ openldap-dev \
pcre-dev \ pcre-dev \
postgresql-dev \ postgresql-dev \
@ -49,7 +50,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -91,7 +92,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 15.0.5 ENV NEXTCLOUD_VERSION 15.0.7
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \ apk add --no-cache --virtual .fetch-deps \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template # DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.2-fpm-stretch FROM php:7.3-fpm-stretch
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -16,7 +16,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
@ -35,6 +35,7 @@ RUN set -ex; \
libpq-dev \ libpq-dev \
libxml2-dev \ libxml2-dev \
libmagickwand-dev \ libmagickwand-dev \
libzip-dev \
; \ ; \
\ \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
@ -55,7 +56,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -102,7 +103,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 15.0.5 ENV NEXTCLOUD_VERSION 15.0.7
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template # DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.2-apache-stretch FROM php:7.3-apache-stretch
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -16,7 +16,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
@ -35,6 +35,7 @@ RUN set -ex; \
libpq-dev \ libpq-dev \
libxml2-dev \ libxml2-dev \
libmagickwand-dev \ libmagickwand-dev \
libzip-dev \
; \ ; \
\ \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
@ -55,7 +56,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -110,7 +111,7 @@ RUN a2enmod rewrite remoteip ;\
} > /etc/apache2/conf-available/remoteip.conf;\ } > /etc/apache2/conf-available/remoteip.conf;\
a2enconf remoteip a2enconf remoteip
ENV NEXTCLOUD_VERSION 13.0.12 ENV NEXTCLOUD_VERSION 16.0.0
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
FROM php:7.2-fpm-alpine3.9 FROM php:7.3-fpm-alpine3.9
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -12,7 +12,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
apk add --no-cache --virtual .build-deps \ apk add --no-cache --virtual .build-deps \
@ -26,6 +26,7 @@ RUN set -ex; \
libpng-dev \ libpng-dev \
libmemcached-dev \ libmemcached-dev \
libxml2-dev \ libxml2-dev \
libzip-dev \
openldap-dev \ openldap-dev \
pcre-dev \ pcre-dev \
postgresql-dev \ postgresql-dev \
@ -49,7 +50,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -91,7 +92,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 13.0.12 ENV NEXTCLOUD_VERSION 16.0.0
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \ apk add --no-cache --virtual .fetch-deps \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -1,5 +1,5 @@
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template # DO NOT EDIT: created by update.sh from Dockerfile-debian.template
FROM php:7.2-fpm-stretch FROM php:7.3-fpm-stretch
# entrypoint.sh and cron.sh dependencies # entrypoint.sh and cron.sh dependencies
RUN set -ex; \ RUN set -ex; \
@ -16,7 +16,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
@ -35,6 +35,7 @@ RUN set -ex; \
libpq-dev \ libpq-dev \
libxml2-dev \ libxml2-dev \
libmagickwand-dev \ libmagickwand-dev \
libzip-dev \
; \ ; \
\ \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
@ -55,7 +56,7 @@ RUN set -ex; \
# pecl will claim success even if one install fails, so we need to perform each install separately # pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-5.1.17; \ pecl install APCu-5.1.17; \
pecl install memcached-3.1.3; \ pecl install memcached-3.1.3; \
pecl install redis-4.2.0; \ pecl install redis-4.3.0; \
pecl install imagick-3.4.3; \ pecl install imagick-3.4.3; \
\ \
docker-php-ext-enable \ docker-php-ext-enable \
@ -102,7 +103,7 @@ RUN { \
VOLUME /var/www/html VOLUME /var/www/html
ENV NEXTCLOUD_VERSION 13.0.12 ENV NEXTCLOUD_VERSION 16.0.0
RUN set -ex; \ RUN set -ex; \
fetchDeps=" \ fetchDeps=" \

View file

@ -0,0 +1,15 @@
<?php
if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN')) {
$CONFIG = array (
'mail_smtpmode' => 'smtp',
'mail_smtphost' => getenv('SMTP_HOST'),
'mail_smtpport' => getenv('SMTP_PORT') ?: (getenv('SMTP_SECURE') ? 465 : 25),
'mail_smtpsecure' => getenv('SMTP_SECURE') ?: '',
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php

View file

@ -11,7 +11,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
apk add --no-cache --virtual .build-deps \ apk add --no-cache --virtual .build-deps \

View file

@ -15,7 +15,7 @@ RUN set -ex; \
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need # install the PHP extensions we need
# see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
RUN set -ex; \ RUN set -ex; \
\ \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \

View file

@ -122,7 +122,7 @@ If you want you can set the data directory and table prefix, otherwise default v
- `NEXTCLOUD_DATA_DIR` (default: _/var/www/html/data_) Configures the data directory where nextcloud stores all files from the users. - `NEXTCLOUD_DATA_DIR` (default: _/var/www/html/data_) Configures the data directory where nextcloud stores all files from the users.
- `NEXTCLOUD_TABLE_PREFIX` (default: _""_) Optional prefix for the tables. Used to be `oc_` in the past - `NEXTCLOUD_TABLE_PREFIX` (default: _""_) Optional prefix for the tables. Used to be `oc_` in the past
One or more trusted domains can be set by environemnt variable, too. They will be added to the configuration after install. One or more trusted domains can be set by environment variable, too. They will be added to the configuration after install.
- `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains - `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains
@ -130,13 +130,27 @@ The install and update script is only triggered when a default command is used (
- `NEXTCLOUD_UPDATE` (default: _0_) - `NEXTCLOUD_UPDATE` (default: _0_)
If you want to use Redis you have to create a seperate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container add: If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container add:
- `REDIS_HOST` (not set by default) Name of Redis container - `REDIS_HOST` (not set by default) Name of Redis container
- `REDIS_HOST_PORT` (default: _6379_) Optional port for Redis, only use for external Redis servers that run on non-standard ports. - `REDIS_HOST_PORT` (default: _6379_) Optional port for Redis, only use for external Redis servers that run on non-standard ports.
The use of Redis is recommended to prevent file locking problems. See the examples for further instructions. The use of Redis is recommended to prevent file locking problems. See the examples for further instructions.
To use a external SMTP server you have to provide the conection details. To configure Nextcloud to use SMTP add:
- `SMTP_HOST` (not set by default) hostname of the SMTP server
- `SMTP_SECURE` (empty by default) set to 'ssl' to use SSL on the connection.
- `SMTP_PORT` (default: _465_ for SSL and _25_ for non-secure connection) Optional port for SMTP connection.
- `SMTP_AUTHTYPE` (default: _LOGIN_) The method used for authentication.
- `SMTP_NAME` (empty by default) Username for the authentication.
- `SMTP_PASSWORD` (empty by default) Password for the authentication.
- `MAIL_FROM_ADDRESS` (not set by default) Use this address for the 'from' field in the mail envelopes sent by Nextcloud.
- `MAIL_DOMAIN` (not set by default) Set a different domain for the emails than the domain where Nextcloud is installed.
Check the [Nextcloud documentation](https://docs.nextcloud.com/server/15/admin_manual/configuration_server/email_configuration.html) for other values to configure SMTP.
# Running this image with docker-compose # Running this image with docker-compose
The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples what you have to look for. The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples what you have to look for.
@ -245,7 +259,11 @@ In our [examples](https://github.com/nextcloud/docker/tree/master/.examples) sec
When you first access your Nextcloud, the setup wizard will appear and ask you to choose an administrator account, password and the database connection. For the database use `db` as host and `nextcloud` as table and user name. Also enter the password you chose in your `docker-compose.yml` file. When you first access your Nextcloud, the setup wizard will appear and ask you to choose an administrator account, password and the database connection. For the database use `db` as host and `nextcloud` as table and user name. Also enter the password you chose in your `docker-compose.yml` file.
# Update to a newer version # Update to a newer version
Updating the Nextcloud container is done by pulling the new image, throwing away the old container and starting the new one. Since all data is stored in volumes, nothing gets lost. The startup script will check for the version in your volume and the installed docker version. If it finds a mismatch, it automatically starts the upgrade process. Don't forget to add all the volumes to your new container, so it works as expected. Updating the Nextcloud container is done by pulling the new image, throwing away the old container and starting the new one.
**It is only possible to upgrade one major version at a time. For example, if you want to upgrade from version 14 to 16, you will have to upgrade from version 14 to 15, then from 15 to 16.**
Since all data is stored in volumes, nothing gets lost. The startup script will check for the version in your volume and the installed docker version. If it finds a mismatch, it automatically starts the upgrade process. Don't forget to add all the volumes to your new container, so it works as expected.
```console ```console
$ docker pull nextcloud $ docker pull nextcloud

View file

@ -20,6 +20,15 @@ run_as() {
} }
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UPDATE:-0}" -eq 1 ]; then
if [ -n "${REDIS_HOST+x}" ]; then
echo "Configuring Redis as session handler"
{
echo 'session.save_handler = redis'
echo "session.save_path = \"tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}\""
} > /usr/local/etc/php/conf.d/redis-session.ini
fi
installed_version="0.0.0.0" installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016 # shellcheck disable=SC2016
@ -51,6 +60,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/ rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi fi
done done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
echo "Initializing finished" echo "Initializing finished"
#install #install

View file

@ -2,8 +2,8 @@
set -Eeuo pipefail set -Eeuo pipefail
declare -A release_channel=( declare -A release_channel=(
[stable]='15.0.5' [stable]='15.0.7'
[production]='15.0.5' [production]='15.0.7'
) )
self="$(basename "$BASH_SOURCE")" self="$(basename "$BASH_SOURCE")"
@ -73,18 +73,6 @@ latest=$( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac|
sort -uV | \ sort -uV | \
tail -1 ) tail -1 )
latest_rc=$( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}RC[[:digit:]]+' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}RC[[:digit:]]+' | \
sort -uV | \
tail -1 )
latest_beta=$( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}beta[[:digit:]]+' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}beta[[:digit:]]+' | \
sort -uV | \
tail -1 )
# Generate each of the tags. # Generate each of the tags.
versions=( */ ) versions=( */ )
versions=( "${versions[@]%/}" ) versions=( "${versions[@]%/}" )
@ -102,19 +90,13 @@ for version in "${versions[@]}"; do
versionPostfix="" versionPostfix=""
if [ "$fullversion_with_extension" != "$fullversion" ]; then if [ "$fullversion_with_extension" != "$fullversion" ]; then
versionAliases=( "$fullversion_with_extension" ) versionAliases=( "$fullversion_with_extension" )
versionPostfix="-$( echo "$fullversion_with_extension" | tr '[:upper:]' '[:lower:]' | grep -oE '(beta|rc)')" versionPostfix="-$( echo "$fullversion_with_extension" | tr '[:upper:]' '[:lower:]' | grep -oE '(beta|rc|alpha)')"
fi fi
versionAliases+=( "$fullversion$versionPostfix" "${fullversion%.*}$versionPostfix" "${fullversion%.*.*}$versionPostfix" ) versionAliases+=( "$fullversion$versionPostfix" "${fullversion%.*}$versionPostfix" "${fullversion%.*.*}$versionPostfix" )
if [ "$fullversion_with_extension" = "$latest" ]; then if [ "$fullversion_with_extension" = "$latest" ]; then
versionAliases+=( "latest" ) versionAliases+=( "latest" )
fi fi
if [ "$fullversion_with_extension" = "$latest_rc" ]; then
versionAliases+=( "rc" )
fi
if [ "$fullversion_with_extension" = "$latest_beta" ]; then
versionAliases+=( "beta" )
fi
for channel in "${!release_channel[@]}"; do for channel in "${!release_channel[@]}"; do
if [ "$fullversion_with_extension" = "${release_channel[$channel]}" ]; then if [ "$fullversion_with_extension" = "${release_channel[$channel]}" ]; then

View file

@ -2,9 +2,8 @@
set -eo pipefail set -eo pipefail
declare -A php_version=( declare -A php_version=(
[default]='7.2' [default]='7.3'
[14.0]='7.2' [14.0]='7.2'
[13.0]='7.2'
) )
declare -A cmd=( declare -A cmd=(
@ -25,11 +24,47 @@ declare -A extras=(
[fpm-alpine]='' [fpm-alpine]=''
) )
apcu_version="$(
git ls-remote --tags https://github.com/krakjoe/apcu.git \
| cut -d/ -f3 \
| grep -vE -- '-rc|-b' \
| sed -E 's/^v//' \
| sort -V \
| tail -1
)"
memcached_version="$(
git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \
| cut -d/ -f3 \
| grep -vE -- '-rc|-b' \
| sed -E 's/^[rv]//' \
| sort -V \
| tail -1
)"
redis_version="$(
git ls-remote --tags https://github.com/phpredis/phpredis.git \
| cut -d/ -f3 \
| grep -viE '[a-z]' \
| tr -d '^{}' \
| sort -V \
| tail -1
)"
imagick_version="$(
git ls-remote --tags https://github.com/mkoppanen/imagick.git \
| cut -d/ -f3 \
| grep -viE '[a-z]' \
| tr -d '^{}' \
| sort -V \
| tail -1
)"
declare -A pecl_versions=( declare -A pecl_versions=(
[APCu]='5.1.17' [APCu]="$apcu_version"
[memcached]='3.1.3' [memcached]="$memcached_version"
[redis]='4.2.0' [redis]="$redis_version"
[imagick]='3.4.3' [imagick]="$imagick_version"
) )
variants=( variants=(
@ -38,7 +73,7 @@ variants=(
fpm-alpine fpm-alpine
) )
min_version='13.0' min_version='14.0'
# version_greater_or_equal A B returns whether A >= B # version_greater_or_equal A B returns whether A >= B
function version_greater_or_equal() { function version_greater_or_equal() {
@ -55,6 +90,11 @@ function check_rc_released() {
printf '%s\n' "${fullversions_rc[@]}" | grep -qE "^$( echo "$1" | grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' )" printf '%s\n' "${fullversions_rc[@]}" | grep -qE "^$( echo "$1" | grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' )"
} }
# checks if the the alpha has already a beta
function check_beta_released() {
printf '%s\n' "${fullversions_beta[@]}" | grep -qE "^$( echo "$1" | grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}' )"
}
travisEnv= travisEnv=
function create_variant() { function create_variant() {
@ -111,7 +151,7 @@ function create_variant() {
done done
} }
find . -maxdepth 1 -type d -regextype sed -regex '\./[[:digit:]]\+\.[[:digit:]]\+\(-rc\|-beta\)\?' -exec rm -r '{}' \; find . -maxdepth 1 -type d -regextype sed -regex '\./[[:digit:]]\+\.[[:digit:]]\+\(-rc\|-beta\|-alpha\)\?' -exec rm -r '{}' \;
fullversions=( $( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \ fullversions=( $( curl -fsSL 'https://download.nextcloud.com/server/releases/' |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}' | \ grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}' | \
@ -170,6 +210,26 @@ for version in "${versions_beta[@]}"; do
fi fi
done done
fullversions_alpha=( $( curl -fsSL 'https://download.nextcloud.com/server/prereleases/' |tac|tac| \
grep -oE 'nextcloud-[[:digit:]]+(\.[[:digit:]]+){2}alpha[[:digit:]]+' | \
grep -oE '[[:digit:]]+(\.[[:digit:]]+){2}alpha[[:digit:]]+' | \
sort -urV ) )
versions_alpha=( $( printf '%s\n' "${fullversions_alpha[@]}" | cut -d. -f1-2 | sort -urV ) )
for version in "${versions_alpha[@]}"; do
fullversion="$( printf '%s\n' "${fullversions_alpha[@]}" | grep -E "^$version" | head -1 )"
if version_greater_or_equal "$version" "$min_version"; then
if ! check_beta_released "$fullversion"; then
for variant in "${variants[@]}"; do
create_variant "$version-alpha" "https:\/\/download.nextcloud.com\/server\/prereleases"
done
fi
fi
done
# remove everything after '- stage: test images' # remove everything after '- stage: test images'
travis="$(awk '!p; /- stage: test images/ {p=1}' .travis.yml)" travis="$(awk '!p; /- stage: test images/ {p=1}' .travis.yml)"
echo "$travis" > .travis.yml echo "$travis" > .travis.yml

View file

@ -2,3 +2,4 @@
/data/ /data/
/custom_apps/ /custom_apps/
/themes/ /themes/
/version.php