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>
36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
# FlixCooks – Production image (Coolify / any Docker host)
|
||
FROM php:8.3-apache-bookworm
|
||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
libpq-dev \
|
||
&& docker-php-ext-install pdo_pgsql \
|
||
&& a2enmod rewrite headers \
|
||
&& rm -rf /var/lib/apt/lists/*
|
||
|
||
# Apache: document root, no per-directory overrides in production
|
||
ENV APACHE_DOCUMENT_ROOT=/var/www/html
|
||
RUN sed -ri 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
|
||
&& sed -ri 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
|
||
&& printf '%s\n' \
|
||
'<Directory /var/www/html>' \
|
||
' AllowOverride None' \
|
||
' Require all granted' \
|
||
'</Directory>' \
|
||
> /etc/apache2/conf-available/flixcooks.conf \
|
||
&& a2enconf flixcooks
|
||
|
||
WORKDIR /var/www/html
|
||
|
||
COPY --chown=www-data:www-data . /var/www/html
|
||
|
||
RUN sed -i 's/\r$//' /var/www/html/docker/entrypoint.sh \
|
||
&& chmod +x /var/www/html/docker/entrypoint.sh
|
||
|
||
EXPOSE 80
|
||
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=40s --retries=3 \
|
||
CMD php /var/www/html/health.php >/dev/null || exit 1
|
||
|
||
ENTRYPOINT ["/var/www/html/docker/entrypoint.sh"]
|
||
CMD ["apache2-foreground"]
|