Files

22 lines
479 B
Bash
Raw Permalink Normal View History

#!/bin/bash
#
# Wrapper entrypoint: runs first-time WordPress setup in the background,
# then hands off to the official WordPress entrypoint.
#
# Set WP_AUTO_SETUP=0 to disable automatic setup.
#
if [ "${WP_AUTO_SETUP:-1}" = "1" ]; then
(
cd /var/www/html
until [ -f wp-config.php ]; do sleep 2; done
sleep 3
if ! wp core is-installed --allow-root 2>/dev/null; then
setup.sh
fi
) &
fi
exec docker-entrypoint.sh "$@"