diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 92697c26..b0aa2cb0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -80,7 +80,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64/v8 + platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 push: true tags: ${{ steps.docker-meta.outputs.tags }} labels: ${{ steps.docker-meta.outputs.labels }} diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index aabfe363..e30fbcaa 100755 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -1,17 +1,7 @@ -#!/bin/sh +#!/bin/bash set -eu -CMD="npm start && pm2 start" - -# if the first arg starts with "-" pass it to program -if [ "${1#-}" != "$1" ]; then - set -- "$CMD" "$@" -fi - # chown current working directory to current user -if [ "$*" = "$CMD" ] && [ "$(id -u)" = "0" ]; then - find . \! -user "$UID" -exec chown "$UID:$GID" -R '{}' + || echo "WARNING! Could not change directory ownership. If you manage permissions externally this is fine, otherwise you may experience issues when downloading or deleting videos." - exec gosu "$UID:$GID" "$0" "$@" -fi - -exec "$@" +echo "[entrypoint] setup permission, this may take a while" +find . \! -user "$UID" -exec chown "$UID:$GID" '{}' + || echo "WARNING! Could not change directory ownership. If you manage permissions externally this is fine, otherwise you may experience issues when downloading or deleting videos." +exec gosu "$UID:$GID" "$@"