mirror of
https://github.com/CoolnsX/selfhost_podman.git
synced 2025-12-20 11:55:16 +05:30
feat: custom entrypoint to run before the official entrypoint in nextcloud container
This commit is contained in:
22
nextcloud/nextcloud-entrypoint.sh
Executable file
22
nextcloud/nextcloud-entrypoint.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
####################
|
||||
# My Special Sauce #
|
||||
####################
|
||||
|
||||
#################################################################
|
||||
# This script is to make the www-data in /entrypoint.sh to #
|
||||
# any user specified by $UID, so that your nextcloud can run #
|
||||
# properly. #
|
||||
#################################################################
|
||||
|
||||
set -eu
|
||||
|
||||
# default to UID=1000 if not set
|
||||
TARGET_UID="${UID:-1000}"
|
||||
|
||||
# replace "www-data" with numeric UID/GID
|
||||
sed -i "s/www-data/${TARGET_UID}/g" /entrypoint.sh
|
||||
|
||||
# execute the patched entrypoint with all args
|
||||
exec /entrypoint.sh php-fpm
|
||||
Reference in New Issue
Block a user