Compare commits

..

39 Commits

Author SHA1 Message Date
Simon L
46d898e196 Merge pull request #215 from nextcloud/enh/noid/update-version
update version to 0.3.0
2022-02-11 17:14:03 +01:00
szaimen
7f034e5109 update version to 0.3.0
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 17:03:56 +01:00
Simon L
46c754759e Merge pull request #213 from nextcloud/enh/noid/fix-spellcheck-warnings
fix spellcheck warnings
2022-02-11 13:02:52 +01:00
szaimen
1339be5045 error if reviewdog found something
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 12:58:19 +01:00
szaimen
53f5b4ae11 fix spellcheck warnings
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 12:48:27 +01:00
Simon L
de7f47e973 Merge pull request #211 from nextcloud/enh/208/set-up-shellcheck
set up shellcheck
2022-02-11 11:46:26 +01:00
szaimen
b08a06573d fix shellcheck
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 11:44:59 +01:00
szaimen
44d491cc5b set bash as shell
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 11:30:22 +01:00
Simon L
96b381bcab Merge pull request #212 from nextcloud/enh/209/set-up-spellcheck
set up spellcheck
2022-02-11 11:14:55 +01:00
szaimen
7b40e6b733 set up spellcheck
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 11:10:51 +01:00
szaimen
ed56f37c4c set up shellcheck
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-11 11:05:59 +01:00
szaimen
baa5f5635b fix talk container build
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-10 20:38:35 +01:00
Simon L
ff59c30604 Merge pull request #206 from nextcloud/fix/fix-postgresql
fix postgresql container
2022-02-09 22:01:32 +01:00
szaimen
1a6253ee4c fix postgresql container
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 21:59:51 +01:00
Simon L
8af877f048 Merge pull request #204 from nextcloud/enh/185/migrate-nextcloud-to-alpine
migrate nextcloud container to alpine
2022-02-09 21:07:08 +01:00
Simon L
02c8b57d4e Merge pull request #194 from nextcloud/aio-dependency-update
Dependency updates
2022-02-09 21:06:49 +01:00
Simon L
0052582003 Merge pull request #189 from nextcloud/fix/188/fix-collabora-connection-issues
fix connection issues with collabora
2022-02-09 21:06:15 +01:00
Simon L
7bb0c3b164 Merge pull request #190 from nextcloud/enh/noid/install-some-apps-by-default
Install some apps by default
2022-02-09 21:06:09 +01:00
Simon L
ddd01be82f Merge pull request #203 from nextcloud/enh/185/migrate-redis-to-alpine
migrate redis container to alpine
2022-02-09 21:06:00 +01:00
Simon L
c585548c07 Merge pull request #198 from nextcloud/enh/193/container-logrotate
add some docs on huge container logs
2022-02-09 21:05:23 +01:00
Simon L
3de828034a Merge pull request #200 from nextcloud/enh/switch-to-debian-slim
switch apache and borgbackup to slim image for reduced size
2022-02-09 21:05:13 +01:00
Simon L
bb3bcad752 Merge pull request #201 from nextcloud/enh/185/migrate-watchtower-to-alpine
migrate watchtower container to alpine
2022-02-09 21:05:00 +01:00
Simon L
0748ee9fbf Merge pull request #202 from nextcloud/enh/185/migrate-postgres-to-alpine
migrate postgres container to alpine
2022-02-09 21:04:51 +01:00
szaimen
a2f01c2fcf migrate nextcloud container to alpine
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 21:00:01 +01:00
szaimen
4b28a6a7d7 migrate watchtower container to alpine
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 20:43:09 +01:00
szaimen
0bf050a51f migrate postgres container to alpine
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 20:38:02 +01:00
szaimen
b9ab319357 migrate redis container to alppine
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 19:46:31 +01:00
szaimen
46c5c59e5b switch apache and borgbackup to slim image for reduced size
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 19:08:37 +01:00
Simon L
ad5e3c3f51 Merge pull request #199 from nextcloud/enh/192/update-opcache-settings
update opcache settings
2022-02-09 18:38:48 +01:00
szaimen
98cb4e9494 update opcache settings
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 18:37:21 +01:00
szaimen
37f219300b add some docs on huge container logs
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 18:21:16 +01:00
szaimen
d934629889 improve the migration docs by putting in the password directly
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-09 18:17:12 +01:00
szaimen
285e093e57 dependency updates
Signed-off-by: GitHub <noreply@github.com>
2022-02-05 12:10:03 +00:00
szaimen
2be5cb255b Install some apps by default
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-03 10:28:33 +01:00
szaimen
7159cd387a fix connection issues with collabora
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-03 10:24:46 +01:00
szaimen
3041e51b04 hopefully fix the workflow
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-02-03 10:11:16 +01:00
szaimen
4e852761d9 try to fix the workflow if there is no outdated dependency
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-01-31 13:24:57 +01:00
szaimen
20d631b600 fix removing the updatenotification app for old instances
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-01-29 22:29:15 +01:00
szaimen
b4c58941ed dependency updates - make all steps visible for better debugging
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-01-29 13:26:23 +01:00
20 changed files with 185 additions and 143 deletions

View File

@@ -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
View 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
View 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

View File

@@ -1,4 +1,4 @@
FROM debian:bullseye
FROM debian:bullseye-slim
EXPOSE 80

View File

@@ -1,4 +1,4 @@
FROM debian:bullseye
FROM debian:bullseye-slim
RUN set -ex; \
\

View File

@@ -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" ./

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 /

View File

@@ -16,5 +16,4 @@ else
exit 1
fi
exec "$@"

View File

@@ -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.

View File

@@ -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
View File

@@ -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": [],

View File

@@ -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 %}

View File

@@ -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.