indy-wp/entrypoint.sh

34 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
2026-03-05 07:11:01 +00:00
set -eu
2026-03-05 07:11:01 +00:00
# -------------------------------------------------
# 0⃣ Run the official WordPress entrypoint first
2026-03-05 07:11:01 +00:00
# -------------------------------------------------
docker-entrypoint.sh "$@"
# -------------------------------------------------
# 1⃣ Verify core exists (optional safety net)
2026-03-05 07:11:01 +00:00
# -------------------------------------------------
if [ ! -d /var/www/html/wp-admin ]; then
echo "❌ WordPress core missing after docker-entrypoint.sh"
exit 1
fi
# -------------------------------------------------
# 2⃣ wp-config.php (already created by the official entrypoint)
2026-03-05 07:11:01 +00:00
# -------------------------------------------------
# No need to create it here the official entrypoint does it.
2026-03-05 07:11:01 +00:00
# -------------------------------------------------
# 3⃣ Wait for DB to be ready (optional, the official entrypoint also does this)
2026-03-05 07:11:01 +00:00
# -------------------------------------------------
until wp db check --path=/var/www/html --allow-root > /dev/null 2>&1; do
echo "⏳ Waiting for database..."
sleep 2
done
# -------------------------------------------------
# 4⃣ Hand over to the themeinstaller (entrypoint-theme.sh will be called later)
2026-03-05 07:11:01 +00:00
# -------------------------------------------------
exec /usr/local/bin/docker-entrypoint.sh "$@"