Update .env.example for local and production database configurations, ensuring clarity on usage. Modify .gitattributes to enforce LF line endings for shell scripts. Enhance README.md with Docker and Coolify setup instructions for production deployment.

This commit is contained in:
2026-05-23 12:43:51 +02:00
parent 6577db475a
commit 054141020d
10 changed files with 624 additions and 3 deletions
+37
View File
@@ -0,0 +1,37 @@
# 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 + AllowOverride for .htaccess
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 All' \
' 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 \
&& mkdir -p /var/www/html/data \
&& chown -R www-data:www-data /var/www/html/data
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"]