Skip to content

Commit

Permalink
Merge pull request #180 from crazy-max/alpine-3.21
Browse files Browse the repository at this point in the history
Alpine Linux 3.21
  • Loading branch information
crazy-max authored Dec 26, 2024
2 parents 92dff6b + d0ed5c0 commit be8649b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-28
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

ARG NEXTCLOUD_VERSION=28.0.14
ARG ALPINE_VERSION=3.20
ARG ALPINE_VERSION=3.21

FROM crazymax/yasu:latest AS yasu
FROM --platform=${BUILDPLATFORM:-linux/amd64} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS download
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-29
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

ARG NEXTCLOUD_VERSION=29.0.10
ARG ALPINE_VERSION=3.20
ARG ALPINE_VERSION=3.21

FROM crazymax/yasu:latest AS yasu
FROM --platform=${BUILDPLATFORM:-linux/amd64} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS download
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-30
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

ARG NEXTCLOUD_VERSION=30.0.4
ARG ALPINE_VERSION=3.20
ARG ALPINE_VERSION=3.21

FROM crazymax/yasu:latest AS yasu
FROM --platform=${BUILDPLATFORM:-linux/amd64} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS download
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ linux/s390x
* `DB_PASSWORD`: Password for database user
* `DB_HOST`: Database host (default `db`)
* `DB_TIMEOUT`: Time in seconds after which we stop trying to reach the database server. Only used for `mysql` and `pgsql` db type (default `60`)
* `DB_SKIP_SSL`: Skip SSL connection to MySQL server (default `true`)

> [!NOTE]
> `DB_PASSWORD_FILE` can be used to fill in the value from a file, especially
Expand Down
4 changes: 2 additions & 2 deletions rootfs/etc/cont-init.d/02-fix-perms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ echo "Fixing perms..."
mkdir -p /data \
/var/run/nginx \
/var/run/php-fpm
chown nextcloud. \
chown nextcloud:nextcloud \
/data
chown -R nextcloud. \
chown -R nextcloud:nextcloud \
/home/nextcloud \
/tpls \
/var/lib/nginx \
Expand Down
14 changes: 9 additions & 5 deletions rootfs/etc/cont-init.d/03-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ LOG_IP_VAR=${LOG_IP_VAR:-remote_addr}
if [ -z "$SUBDIR" ]
then
REDIRECT_URL='$scheme://$host'
else
else
REDIRECT_URL=$SUBDIR
fi

Expand All @@ -56,6 +56,7 @@ DB_HOST=${DB_HOST:-db}
DB_NAME=${DB_NAME:-nextcloud}
DB_USER=${DB_USER:-nextcloud}
DB_TIMEOUT=${DB_TIMEOUT:-60}
DB_SKIP_SSL=${DB_SKIP_SSL:-true}

SIDECAR_CRON=${SIDECAR_CRON:-0}
SIDECAR_NEWSUPDATER=${SIDECAR_NEWSUPDATER:-0}
Expand Down Expand Up @@ -106,13 +107,13 @@ mkdir -p /data/config /data/data /data/session /data/tmp /data/userapps
if [ ! -d /data/themes ]; then
if [ -d /var/www/themes ]; then
mv -f /var/www/themes /data/
chown -R nextcloud. /data/themes
chown -R nextcloud:nextcloud /data/themes
fi
mkdir -p /data/themes
elif [ -d /var/www/themes ]; then
rm -rf /var/www/themes
fi
chown nextcloud. /data/config /data/data /data/session /data/tmp /data/userapps /data/themes
chown nextcloud:nextcloud /data/config /data/data /data/session /data/tmp /data/userapps /data/themes
ln -sf /data/config/config.php /var/www/config/config.php &>/dev/null
ln -sf /data/themes /var/www/themes &>/dev/null
ln -sf /data/userapps /var/www/userapps &>/dev/null
Expand All @@ -131,7 +132,10 @@ if [ "$DB_TYPE" = "mysql" ]; then
exit 1
fi

dbcmd="mysql -h ${DB_HOST} -u "${DB_USER}" "-p${DB_PASSWORD}""
dbcmd="mariadb -h ${DB_HOST} -u "${DB_USER}" "-p${DB_PASSWORD}""
if [ "$DB_SKIP_SSL" = "true" ]; then
dbcmd="$dbcmd --skip-ssl"
fi

echo "Waiting ${DB_TIMEOUT}s for database to be ready..."
counter=1
Expand Down Expand Up @@ -235,4 +239,4 @@ EOL
fi

# config directory must be writable
chown -R nextcloud. /var/www/config
chown -R nextcloud:nextcloud /var/www/config
1 change: 0 additions & 1 deletion rootfs/tpls/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ http {
default_type application/octet-stream;
types {
text/javascript mjs;
application/wasm wasm;
}

aio threads;
Expand Down

0 comments on commit be8649b

Please sign in to comment.