Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add init custom script #263

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions images/yourls/container-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then
# could be on a filesystem that doesn't allow chown (like some NFS setups)
chown "$user:$group" user/config.php || true
fi

# ability to use custom script with helm chart
if [[ -d "/docker-entrypoint-init.d" ]]; then
read -r -a init_scripts <<< "$(find "/docker-entrypoint-init.d" -type f -print0 | sort -z | xargs -0)"
if [[ "${#init_scripts[@]}" -gt 0 ]]; then
for init_script in "${init_scripts[@]}"; do
"$init_script"
done
fi
fi
fi
fi

Expand Down