Files
flixcooks-website/docker/entrypoint.sh
T
smacksandClaude Sonnet 4.6 86fbd8e4bb Remove static JSON files and seed step; migrate site settings to Postgres
All content (recipes + imprint/privacy settings) now lives exclusively in
Postgres. The app no longer requires a seed step on first deploy.

Changes:
- helpers.php: load_site_settings() returns defaults when site_settings
  table is empty instead of throwing DatabaseUnavailableException; removes
  legacy JSONB migration path
- data/recipes.json, data/site.json: deleted (content already in DB)
- scripts/db-seed.php: deleted (no longer needed)
- docker-compose.yml: remove RUN_DB_SEED env var and data/ volume mount
- docker/entrypoint.sh: remove RUN_DB_SEED seed block
- docs/COOLIFY.md: update deployment guide to reflect seedless workflow
- .claude/launch.json: add dev server configurations for preview tool

Fresh deploys now start with placeholder legal pages and an empty recipe
list; the admin fills in real content via /admin.php without any CLI step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 09:53:39 +02:00

24 lines
525 B
Bash

#!/bin/bash
set -euo pipefail
cd /var/www/html
echo "[flixcooks] Waiting for database..."
TRIES=0
MAX_TRIES="${DB_WAIT_MAX_TRIES:-30}"
until php scripts/db-check.php >/dev/null 2>&1; do
TRIES=$((TRIES + 1))
if [ "$TRIES" -ge "$MAX_TRIES" ]; then
echo "[flixcooks] Database not reachable after ${MAX_TRIES} attempts." >&2
exit 1
fi
sleep 2
done
echo "[flixcooks] Applying schema..."
php -r "require 'helpers.php'; require_database(); echo \"schema ok\n\";"
echo "[flixcooks] Starting Apache..."
exec "$@"