diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 4149917..5f10673 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -53,13 +53,13 @@ chmod 644 "$SECRETS_DIR/db_password" "$SECRETS_DIR/db_root_password" echo "==> building and starting ${ENVIRONMENT}" $COMPOSE up -d --build -echo "==> waiting for the wordpress container to come up" -for i in $(seq 1 30); do - if $COMPOSE exec -T wordpress php -v >/dev/null 2>&1; then +echo "==> waiting for WordPress core files (the official image copies them in on first boot of an empty volume, which takes a few seconds)" +for i in $(seq 1 60); do + if $COMPOSE exec -T wordpress test -f /var/www/html/wp-settings.php >/dev/null 2>&1; then break fi - if [[ "$i" -eq 30 ]]; then - echo "wordpress container did not become ready in time" >&2 + if [[ "$i" -eq 60 ]]; then + echo "wordpress core files did not appear in time" >&2 exit 1 fi sleep 2