Skip to content

Commit

Permalink
Update entrypoint.sh to add /docker-entrypoint-initdb.d
Browse files Browse the repository at this point in the history
Add /docker-entrypoint-initdb.d support like most other images.

This will only run these on init and allows adding scripts that modify the setup just after first init, for example you could use it to modify ca.json and add/change datasource.
  • Loading branch information
wizhippo authored Jun 24, 2024
1 parent 9bf6a83 commit 65f4e9e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ function step_ca_init () {
echo "🤫 This will only be displayed once."
shred -u $STEPPATH/provisioner_password
mv $STEPPATH/password $PWDPATH

# Run scripts in /docker-entrypoint-initdb.d
if [ -d /docker-entrypoint-initdb.d ]; then
for f in /docker-entrypoint-initdb.d/*; do
case "$f" in
*.sh) echo "$0: running $f"; . "$f" ;;
*) echo "$0: ignoring $f" ;;
esac
echo
done
fi
}

if [ -f /usr/sbin/pcscd ]; then
Expand Down

0 comments on commit 65f4e9e

Please sign in to comment.