Files
wc-bootstrap/docker/entrypoint.sh
magdev 624de0cae6 Add Docker development environment
Multistage Dockerfile (WooCommerce download, wp-bootstrap npm build,
Composer deps, WordPress runtime), Compose stack with MariaDB, and
auto-setup entrypoint that installs WordPress and activates the theme
on first boot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:59:20 +01:00

22 lines
479 B
Bash

#!/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 "$@"