diff --git a/Dockerfile b/Dockerfile index 343dba0..26f1d76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,5 +68,5 @@ COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/ COPY --chown=$UID:$GID [ "/backend/", "/app/" ] EXPOSE 17442 -# ENTRYPOINT [ "/app/entrypoint.sh" ] +ENTRYPOINT [ "/app/entrypoint.sh" ] CMD [ "pm2-runtime", "pm2.config.js" ] diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index 5074353..e563fb9 100755 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -11,7 +11,7 @@ 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 su-exec "$UID:$GID" "$0" "$@" + exec /usr/lib/apache2/suexec-custom "$UID:$GID" "$0" "$@" fi exec "$@"