Skip to content

Commit

Permalink
feat: add init custom script
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume authored and LeoColomb committed Feb 14, 2024
1 parent 19bab5f commit 02d5234
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 02d5234

Please sign in to comment.