Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions 8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ EXPOSE 9000
COPY templates /etc/gotpl/
COPY docker-entrypoint.sh /
COPY bin /usr/local/bin/
COPY init /docker-entrypoint-init.d/

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["sudo", "-E", "php-fpm"]
26 changes: 26 additions & 0 deletions 8/init/90_wodby_init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

set -e

if [[ -n "${DEBUG}" ]]; then
set -x
fi

# Applies the service init action on container start.
#
# The init action prepares the application codebase for this image, for example
# by wiring the generated Wodby config into the application's own settings file
# and symlinking public files to the persistent volume. Its steps are guarded
# and idempotent, so when the image was built with the init action already
# applied this is a no-op.
#
# WODBY_INIT_ACTION names a target in /usr/local/bin/actions.mk and is provided
# as an environment variable rather than baked into the image, so the init
# action is applied no matter which Dockerfile produced the image.
#
# This file is sourced by exec_init_scripts, not executed in a subshell. Do not
# use "exit" here, it would terminate the entrypoint and stop the container.
if [[ -n "${WODBY_INIT_ACTION}" ]]; then
echo "Applying init action: ${WODBY_INIT_ACTION}"
make "${WODBY_INIT_ACTION}" -f /usr/local/bin/actions.mk
fi
Loading