mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 19:00:33 +00:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46d898e196 | ||
|
|
7f034e5109 | ||
|
|
46c754759e | ||
|
|
1339be5045 | ||
|
|
53f5b4ae11 | ||
|
|
de7f47e973 | ||
|
|
b08a06573d | ||
|
|
44d491cc5b | ||
|
|
96b381bcab | ||
|
|
7b40e6b733 | ||
|
|
ed56f37c4c | ||
|
|
baa5f5635b | ||
|
|
ff59c30604 | ||
|
|
1a6253ee4c | ||
|
|
8af877f048 | ||
|
|
02c8b57d4e | ||
|
|
0052582003 | ||
|
|
7bb0c3b164 | ||
|
|
ddd01be82f | ||
|
|
c585548c07 | ||
|
|
3de828034a | ||
|
|
bb3bcad752 | ||
|
|
0748ee9fbf | ||
|
|
a2f01c2fcf | ||
|
|
4b28a6a7d7 | ||
|
|
0bf050a51f | ||
|
|
b9ab319357 | ||
|
|
46c5c59e5b | ||
|
|
ad5e3c3f51 | ||
|
|
98cb4e9494 | ||
|
|
37f219300b | ||
|
|
d934629889 | ||
|
|
285e093e57 | ||
|
|
2be5cb255b | ||
|
|
7159cd387a | ||
|
|
3041e51b04 | ||
|
|
4e852761d9 | ||
|
|
20d631b600 | ||
|
|
b4c58941ed |
3
.github/workflows/dependency-updates.yml
vendored
3
.github/workflows/dependency-updates.yml
vendored
@@ -15,12 +15,15 @@ jobs:
|
||||
php-version: '8.0'
|
||||
- name: Run dependency update script
|
||||
run: |
|
||||
set -x
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
mv composer.phar /usr/local/bin/composer
|
||||
chmod +x /usr/local/bin/composer
|
||||
cd ./php
|
||||
composer update
|
||||
set +e
|
||||
ALL_LINES="$(composer outdated | grep -v "psr/container")"
|
||||
set -e
|
||||
while [ -n "$ALL_LINES" ]; do
|
||||
CURRENT_LINE="$(echo "$ALL_LINES" | head -1)"
|
||||
composer require "$(echo "$CURRENT_LINE" | awk '{print $1}')" "^$(echo "$CURRENT_LINE" | awk '{print $4}')"
|
||||
|
||||
18
.github/workflows/shellcheck.yml
vendored
Normal file
18
.github/workflows/shellcheck.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Shellcheck
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
name: Github Actions
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run Shellcheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
with:
|
||||
check_together: 'yes'
|
||||
env:
|
||||
SHELLCHECK_OPTS: --shell bash
|
||||
19
.github/workflows/spellcheck.yml
vendored
Normal file
19
.github/workflows/spellcheck.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: 'Spellcheck'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
spellcheck:
|
||||
name: Check spelling
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: spelling or typos
|
||||
uses: actions/checkout@v2
|
||||
- name: misspell
|
||||
uses: reviewdog/action-misspell@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
locale: "US"
|
||||
fail_on_error: true
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM debian:bullseye
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM debian:bullseye
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
|
||||
@@ -40,9 +40,10 @@ if ! docker info &>/dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
|
||||
API_VERSION="$(grep -oP 'const API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP [0-9]+.[0-9]+ | head -1)"
|
||||
API_VERSION="$(grep -oP 'const API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)"
|
||||
# shellcheck disable=SC2001
|
||||
API_VERSION_NUMB="$(echo "$API_VERSION" | sed 's/\.//')"
|
||||
LOCAL_API_VERSION_NUMB="$(docker version | grep -i "api version" | grep -oP [0-9]+.[0-9]+ | head -1 | sed 's/\.//')"
|
||||
LOCAL_API_VERSION_NUMB="$(docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
|
||||
if [ -n "$LOCAL_API_VERSION_NUMB" ] && [ -n "$API_VERSION_NUMB" ]; then
|
||||
if ! [ "$LOCAL_API_VERSION_NUMB" -ge "$API_VERSION_NUMB" ]; then
|
||||
echo "Docker v$API_VERSION is not supported by your docker engine. Cannot proceed."
|
||||
@@ -71,12 +72,12 @@ chown root:root -R /mnt/docker-aio-config/certs/
|
||||
GENERATED_CERTS="/mnt/docker-aio-config/certs"
|
||||
TMP_CERTS="/etc/apache2/certs"
|
||||
mkdir -p "$GENERATED_CERTS"
|
||||
cd "$GENERATED_CERTS"
|
||||
cd "$GENERATED_CERTS" || exit 1
|
||||
if ! [ -f ./ssl.crt ] && ! [ -f ./ssl.key ]; then
|
||||
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=DE/ST=BE/L=Local/O=Dev/CN=nextcloud.local" -keyout ./ssl.key -out ./ssl.crt
|
||||
fi
|
||||
if [ -f ./ssl.crt ] && [ -f ./ssl.key ]; then
|
||||
cd "$TMP_CERTS"
|
||||
cd "$TMP_CERTS" || exit 1
|
||||
rm ./ssl.crt
|
||||
rm ./ssl.key
|
||||
cp "$GENERATED_CERTS/ssl.crt" ./
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
# From https://github.com/nextcloud/docker/blob/master/22/fpm/Dockerfile
|
||||
FROM php:8.0-fpm-bullseye
|
||||
# From https://github.com/nextcloud/docker/blob/master/23/fpm-alpine/Dockerfile
|
||||
FROM php:8.0-fpm-alpine
|
||||
|
||||
# Custom: change id of www-data user as it needs to be the same like on old installations
|
||||
RUN set -ex; \
|
||||
apk add --no-cache shadow; \
|
||||
deluser www-data; \
|
||||
groupmod -g 333 xfs; \
|
||||
usermod -u 333 -g 333 xfs; \
|
||||
addgroup -g 33 -S www-data; \
|
||||
adduser -u 33 -D -S -G www-data www-data
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apk add --no-cache \
|
||||
rsync \
|
||||
bzip2 \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*;
|
||||
;
|
||||
|
||||
# install the PHP extensions we need
|
||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
@@ -17,30 +23,28 @@ ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 10G
|
||||
RUN set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
$PHPIZE_DEPS \
|
||||
autoconf \
|
||||
freetype-dev \
|
||||
icu-dev \
|
||||
libevent-dev \
|
||||
libfreetype6-dev \
|
||||
libicu-dev \
|
||||
libjpeg-dev \
|
||||
libldap2-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libmcrypt-dev \
|
||||
libmemcached-dev \
|
||||
libpng-dev \
|
||||
libpq-dev \
|
||||
libmemcached-dev \
|
||||
libxml2-dev \
|
||||
libmagickwand-dev \
|
||||
libzip-dev \
|
||||
openldap-dev \
|
||||
pcre-dev \
|
||||
postgresql-dev \
|
||||
imagemagick-dev \
|
||||
libwebp-dev \
|
||||
libgmp-dev \
|
||||
gmp-dev \
|
||||
; \
|
||||
\
|
||||
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||||
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \
|
||||
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
|
||||
docker-php-ext-configure ldap; \
|
||||
docker-php-ext-install -j "$(nproc)" \
|
||||
bcmath \
|
||||
exif \
|
||||
@@ -69,29 +73,21 @@ RUN set -ex; \
|
||||
; \
|
||||
rm -r /tmp/pear; \
|
||||
\
|
||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||
apt-mark auto '.*' > /dev/null; \
|
||||
apt-mark manual $savedAptMark; \
|
||||
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
|
||||
| awk '/=>/ { print $3 }' \
|
||||
| sort -u \
|
||||
| xargs -r dpkg-query -S \
|
||||
| cut -d: -f1 \
|
||||
| sort -u \
|
||||
| xargs -rt apt-mark manual; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
runDeps="$( \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)"; \
|
||||
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
|
||||
apk del .build-deps
|
||||
|
||||
# set recommended PHP.ini settings
|
||||
# see https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
|
||||
RUN { \
|
||||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.interned_strings_buffer=8'; \
|
||||
echo 'opcache.max_accelerated_files=10000'; \
|
||||
echo 'opcache.memory_consumption=128'; \
|
||||
echo 'opcache.interned_strings_buffer=16'; \
|
||||
echo 'opcache.save_comments=1'; \
|
||||
echo 'opcache.revalidate_freq=1'; \
|
||||
echo 'opcache.revalidate_freq=60'; \
|
||||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
|
||||
\
|
||||
echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
||||
@@ -112,12 +108,10 @@ VOLUME /var/www/html
|
||||
ENV NEXTCLOUD_VERSION 23.0.1
|
||||
|
||||
RUN set -ex; \
|
||||
fetchDeps=" \
|
||||
apk add --no-cache --virtual .fetch-deps \
|
||||
bzip2 \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends $fetchDeps; \
|
||||
; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 \
|
||||
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
|
||||
@@ -125,7 +119,7 @@ RUN set -ex; \
|
||||
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
@@ -134,9 +128,7 @@ RUN set -ex; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apk del .fetch-deps
|
||||
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
@@ -144,31 +136,28 @@ COPY config/* /usr/src/nextcloud/config/
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["php-fpm"]
|
||||
|
||||
# Template from https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/full/fpm/Dockerfile
|
||||
# Template from https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/full/fpm-alpine/Dockerfile
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apk add --no-cache \
|
||||
ffmpeg \
|
||||
libmagickcore-6.q16-6-extra \
|
||||
imagemagick \
|
||||
procps \
|
||||
smbclient \
|
||||
samba-client \
|
||||
supervisor \
|
||||
# libreoffice \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
;
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libbz2-dev \
|
||||
libc-client-dev \
|
||||
libkrb5-dev \
|
||||
libsmbclient-dev \
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
$PHPIZE_DEPS \
|
||||
imap-dev \
|
||||
krb5-dev \
|
||||
openssl-dev \
|
||||
samba-dev \
|
||||
bzip2-dev \
|
||||
; \
|
||||
\
|
||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||
@@ -179,19 +168,14 @@ RUN set -ex; \
|
||||
pecl install smbclient; \
|
||||
docker-php-ext-enable smbclient; \
|
||||
\
|
||||
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||||
apt-mark auto '.*' > /dev/null; \
|
||||
apt-mark manual $savedAptMark; \
|
||||
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
|
||||
| awk '/=>/ { print $3 }' \
|
||||
| sort -u \
|
||||
| xargs -r dpkg-query -S \
|
||||
| cut -d: -f1 \
|
||||
| sort -u \
|
||||
| xargs -rt apt-mark manual; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
runDeps="$( \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)"; \
|
||||
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
|
||||
apk del .build-deps
|
||||
|
||||
RUN mkdir -p \
|
||||
/var/log/supervisord \
|
||||
@@ -207,12 +191,11 @@ CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||
# Custom:
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
netcat \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
netcat-openbsd \
|
||||
openssl \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
git \
|
||||
postgresql-client \
|
||||
; \
|
||||
@@ -225,14 +208,16 @@ RUN set -ex; \
|
||||
sed -i 's/^pm.min_spare_servers =.*/pm.min_spare_servers = 25/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's/^pm.max_spare_servers =.*/pm.max_spare_servers = 75/' /usr/local/etc/php-fpm.d/www.conf
|
||||
|
||||
RUN rm -rf /tmp/nextcloud-aio && \
|
||||
RUN set -ex; \
|
||||
rm -rf /tmp/nextcloud-aio && \
|
||||
mkdir -p /tmp/nextcloud-aio && \
|
||||
cd /tmp/nextcloud-aio && \
|
||||
git clone https://github.com/nextcloud-releases/all-in-one.git --depth 1 .; \
|
||||
mkdir -p /usr/src/nextcloud/apps/nextcloud-aio; \
|
||||
cp -r ./app/* /usr/src/nextcloud/apps/nextcloud-aio/
|
||||
|
||||
RUN chown www-data:root -R /usr/src && \
|
||||
RUN set -ex; \
|
||||
chown www-data:root -R /usr/src && \
|
||||
chown www-data:root -R /usr/local/etc/php/conf.d && \
|
||||
chown www-data:root -R /var/log/supervisord/ && \
|
||||
chown www-data:root -R /var/run/supervisord/ && \
|
||||
@@ -242,14 +227,16 @@ RUN chown www-data:root -R /usr/src && \
|
||||
|
||||
COPY start.sh /
|
||||
COPY notify.sh /
|
||||
RUN chmod +x /start.sh && \
|
||||
RUN set -ex; \
|
||||
chmod +x /start.sh && \
|
||||
chmod +r /supervisord.conf && \
|
||||
chmod +x /entrypoint.sh && \
|
||||
chmod +r /upgrade.exclude && \
|
||||
chmod +x /cron.sh && \
|
||||
chmod +x /notify.sh
|
||||
|
||||
RUN mkdir /mnt/ncdata; \
|
||||
RUN set -ex; \
|
||||
mkdir /mnt/ncdata; \
|
||||
chown www-data:www-data /mnt/ncdata;
|
||||
|
||||
VOLUME /mnt/ncdata
|
||||
|
||||
@@ -50,7 +50,8 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
||||
NEXT_MAJOR="$((INSTALLED_MAJOR + 1))"
|
||||
curl -fsSL -o nextcloud.tar.bz2 "https://download.nextcloud.com/server/releases/latest-${NEXT_MAJOR}.tar.bz2"
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/latest-${NEXT_MAJOR}.tar.bz2.asc"
|
||||
export GNUPGHOME="$(mktemp -d)"
|
||||
GNUPGHOME="$(mktemp -d)"
|
||||
export GNUPGHOME
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2
|
||||
@@ -97,6 +98,11 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
||||
fi
|
||||
|
||||
php /var/www/html/occ app:update --all
|
||||
|
||||
# Fix removing the updatenotification for old instances
|
||||
if [ -d "/var/www/html/apps/updatenotification" ]; then
|
||||
php /var/www/html/occ app:disable updatenotification
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Initializing nextcloud $image_version ..."
|
||||
@@ -177,6 +183,14 @@ if ! [ -f "/mnt/ncdata/skip.update" ]; then
|
||||
# Not needed anymore with the removal of the updatenotification app:
|
||||
# php /var/www/html/occ config:app:set updatenotification notify_groups --value="[]"
|
||||
|
||||
# Install some apps by default
|
||||
php /var/www/html/occ app:install twofactor_totp
|
||||
php /var/www/html/occ app:install deck
|
||||
php /var/www/html/occ app:install tasks
|
||||
php /var/www/html/occ app:install calendar
|
||||
php /var/www/html/occ app:install contacts
|
||||
php /var/www/html/occ app:install apporder
|
||||
|
||||
#upgrade
|
||||
else
|
||||
while [ -n "$(pgrep -f cron.php)" ]
|
||||
@@ -248,6 +262,8 @@ else
|
||||
fi
|
||||
php /var/www/html/occ config:app:set richdocuments wopi_url --value="https://$NC_DOMAIN/"
|
||||
# php /var/www/html/occ richdocuments:activate-config
|
||||
# Fix https://github.com/nextcloud/all-in-one/issues/188:
|
||||
php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool --value=true
|
||||
|
||||
# Talk
|
||||
if ! [ -d "/var/www/html/custom_apps/spreed" ]; then
|
||||
|
||||
@@ -12,7 +12,8 @@ if ! bash /entrypoint.sh; then
|
||||
fi
|
||||
|
||||
# Correctly set CPU_ARCH for notify_push
|
||||
export CPU_ARCH="$(uname -m)"
|
||||
CPU_ARCH="$(uname -m)"
|
||||
export CPU_ARCH
|
||||
if [ -z "$CPU_ARCH" ]; then
|
||||
echo "Could not get processor architecture. Exiting."
|
||||
exit 1
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
# From https://github.com/docker-library/postgres/blob/master/13/bullseye/Dockerfile
|
||||
FROM postgres:13-bullseye
|
||||
# From https://github.com/docker-library/postgres/blob/master/13/alpine/Dockerfile
|
||||
FROM postgres:13-alpine
|
||||
|
||||
RUN apk add --update --no-cache bash openssl shadow
|
||||
|
||||
# We need to use the same gid and uid as on old installations
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
openssl \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
deluser postgres; \
|
||||
groupmod -g 9999 ping; \
|
||||
addgroup -g 999 -S postgres; \
|
||||
adduser -u 999 -S -D -G postgres -H -h /var/lib/postgresql -s /bin/sh postgres
|
||||
|
||||
# Fix default permissions
|
||||
RUN set -ex; \
|
||||
chown -R postgres:postgres /var/lib/postgresql; \
|
||||
chown -R postgres:postgres /var/run/postgresql; \
|
||||
chown -R postgres:postgres "$PGDATA"
|
||||
|
||||
COPY start.sh /usr/bin/
|
||||
RUN chmod +x /usr/bin/start.sh
|
||||
|
||||
@@ -19,6 +19,7 @@ if ! [ -w "$DUMP_DIR" ]; then
|
||||
fi
|
||||
|
||||
# Test if some things match
|
||||
# shellcheck disable=SC2235
|
||||
if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSION")" ] ) \
|
||||
|| ( ! [ -f "$DATADIR/PG_VERSION" ] && [ -f "$DUMP_FILE" ] ); then
|
||||
# The DUMP_file must be provided
|
||||
@@ -41,7 +42,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
|
||||
set -e
|
||||
|
||||
# Remove old database files
|
||||
rm -rf "$DATADIR/"*
|
||||
rm -rf "${DATADIR:?}/"*
|
||||
|
||||
# Change database port to a random port temporarily
|
||||
export PGPORT=11000
|
||||
@@ -69,7 +70,7 @@ fi
|
||||
# Cover the last case
|
||||
if ! [ -f "$DATADIR/PG_VERSION" ] && ! [ -f "$DUMP_FILE" ]; then
|
||||
# Remove old database files if somehow there should be some
|
||||
rm -rf "$DATADIR/"*
|
||||
rm -rf "${DATADIR:?}/"*
|
||||
fi
|
||||
|
||||
# Catch docker stop attempts
|
||||
@@ -91,6 +92,6 @@ if pg_dump --username "$POSTGRES_USER" "$POSTGRES_DB" > "$DUMP_FILE.temp"; then
|
||||
exit 0
|
||||
else
|
||||
pg_ctl stop -m fast
|
||||
echo "Database dump unsucessful!"
|
||||
echo "Database dump unsuccessful!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
# From https://github.com/docker-library/redis/blob/master/6.2/Dockerfile
|
||||
FROM redis:6.2-bullseye
|
||||
# From https://github.com/docker-library/redis/blob/master/6.2/alpine/Dockerfile
|
||||
FROM redis:6.2-alpine
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
openssl \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN apk add --update --no-cache openssl bash
|
||||
|
||||
COPY start.sh /usr/bin/
|
||||
RUN chmod +x /usr/bin/start.sh
|
||||
|
||||
@@ -19,7 +19,7 @@ RUN set -ex; \
|
||||
echo "deb https://packaging.gitlab.io/nats-server nats main" > /etc/apt/sources.list.d/morph027-nats-server.list; \
|
||||
. /etc/lsb-release; \
|
||||
curl -sL -o "/etc/apt/trusted.gpg.d/morph027-janus.asc" "https://packaging.gitlab.io/janus/gpg.key"; \
|
||||
echo "deb https://packaging.gitlab.io/janus $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/morph027-janus.list; \
|
||||
echo "deb https://packaging.gitlab.io/janus/$DISTRIB_CODENAME $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/morph027-janus.list; \
|
||||
curl -sL -o "/etc/apt/trusted.gpg.d/morph027-nextcloud-spreed-signaling.asc" "https://packaging.gitlab.io/nextcloud-spreed-signaling/gpg.key"; \
|
||||
echo "deb https://packaging.gitlab.io/nextcloud-spreed-signaling signaling main" > /etc/apt/sources.list.d/morph027-nextcloud-spreed-signaling.list
|
||||
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
# From https://github.com/containrrr/watchtower/blob/main/dockerfiles/Dockerfile.self-contained
|
||||
FROM containrrr/watchtower:latest as watchtower
|
||||
|
||||
FROM debian:bullseye
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --update --no-cache bash
|
||||
COPY --from=watchtower /watchtower /
|
||||
|
||||
COPY start.sh /
|
||||
|
||||
@@ -16,5 +16,4 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
exec "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## How to develope the app?
|
||||
## How to develop the app?
|
||||
|
||||
Please note that in order to check if an app is already downloaded
|
||||
Nextcloud will look for a folder with the same name as the app.
|
||||
|
||||
@@ -42,7 +42,7 @@ The procedure for migrating the files and the database works like this:
|
||||
```
|
||||
1. Run the following command to start the conversion:
|
||||
```
|
||||
occ db:convert-type --all-apps pgsql "$PG_USER" 127.0.0.1 "$PG_DATABASE"
|
||||
occ db:convert-type --all-apps --password "$PGDB_PASS" pgsql "$PG_USER" 127.0.0.1 "$PG_DATABASE"
|
||||
```
|
||||
**Please note:** You might need to change the ip-address `127.0.0.1` based on your exact installation.<br>
|
||||
Further information on the conversion is additionally available here: https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/db_conversion.html#converting-database-type
|
||||
|
||||
26
php/composer.lock
generated
26
php/composer.lock
generated
@@ -409,12 +409,12 @@
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"FastRoute\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"FastRoute\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -1628,12 +1628,12 @@
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php81\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php81\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
@@ -1681,16 +1681,16 @@
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v3.3.7",
|
||||
"version": "v3.3.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "8f168c6ffa3ce76d1786b3cd52275424a3fc675b"
|
||||
"reference": "972d8604a92b7054828b539f2febb0211dd5945c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/8f168c6ffa3ce76d1786b3cd52275424a3fc675b",
|
||||
"reference": "8f168c6ffa3ce76d1786b3cd52275424a3fc675b",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c",
|
||||
"reference": "972d8604a92b7054828b539f2febb0211dd5945c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1741,7 +1741,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/twigphp/Twig/issues",
|
||||
"source": "https://github.com/twigphp/Twig/tree/v3.3.7"
|
||||
"source": "https://github.com/twigphp/Twig/tree/v3.3.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1753,7 +1753,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-03T21:15:37+00:00"
|
||||
"time": "2022-02-04T06:59:48+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
<h1>Nextcloud AIO Beta v0.2.1</h1>
|
||||
<h1>Nextcloud AIO Beta v0.3.0</h1>
|
||||
This is beta software and not production ready.<br><br>
|
||||
|
||||
{% set isAnyRunning = false %}
|
||||
@@ -60,7 +60,7 @@
|
||||
<input class="button" type="submit" value="Submit" />
|
||||
</form>
|
||||
Make sure that this server is reachable on Port 443 and you've correctly set up the DNS config for the domain that you enter. <br><br>
|
||||
If you have a dynamic IP-adress, you can use e.g. <a href="https://ddclient.net/">DDclient</a> with a compatible domain provider for DNS updates.
|
||||
If you have a dynamic IP-address, you can use e.g. <a href="https://ddclient.net/">DDclient</a> with a compatible domain provider for DNS updates.
|
||||
{% endif %}
|
||||
|
||||
{% if domain != "" %}
|
||||
@@ -177,9 +177,9 @@
|
||||
<span class="status error"></span> Last {{ borg_backup_mode }} failed! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
|
||||
{% elseif backup_exit_code == 0 %}
|
||||
{% if borg_backup_mode == "backup" %}
|
||||
<span class="status success"></span> Last {{ borg_backup_mode }} succesful on {{ last_backup_time }}! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
|
||||
<span class="status success"></span> Last {{ borg_backup_mode }} successful on {{ last_backup_time }}! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
|
||||
{% else %}
|
||||
<span class="status success"></span> Last {{ borg_backup_mode }} succesful! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
|
||||
<span class="status success"></span> Last {{ borg_backup_mode }} successful! (<a href="/api/docker/logs?id=nextcloud-aio-borgbackup">Logs</a>)<br /><br />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -119,6 +119,9 @@ The backups itself get encrypted with an encryption key that gets shown to you i
|
||||
|
||||
Note that this implementation does not provide remote backups, for this you can use the [backup app](https://apps.nextcloud.com/apps/backup).
|
||||
|
||||
### Huge docker logs
|
||||
When your containers run for a few days without a restart, the container logs that you can view from the AIO interface can get really huge. You can limit the loge sizes by enabling logrotate for docker container logs. Feel free to enable this by following those instructions: https://sandro-keil.de/blog/logrotate-for-docker-container/
|
||||
|
||||
### Access/Edit Nextcloud files/folders manually
|
||||
The files and folders that you add to Nextcloud are by default stored in the following directory: `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/` on the host. If needed, you can modify/add/delete files/folders there but **ATTENTION**: be very careful when doing so because you might corrupt your AIO installation! Best is to create a backup using the built-in backup solution before editing/changing files/folders in there because you will then be able to restore your instance to the backed up state.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user