This commit is contained in:
2025-11-08 18:22:00 +01:00
parent a072419989
commit 7b7ca33781
5 changed files with 47 additions and 27 deletions

View File

@@ -1,11 +1,12 @@
# Database Configuration
DB_HOST=db
DB_PORT=3306
DB_DATABASE=immorechner
DB_USERNAME=immorechner_user
DB_PASSWORD=immorechner_pass
DB_ROOT_PASSWORD=root
# Symfony Application Configuration
APP_ENV=dev
APP_SECRET=change_this_to_a_random_secret_key
# Application Configuration
APP_ENV=local
APP_DEBUG=true
# Database Configuration (MariaDB)
DATABASE_URL="mysql://immorechner_user:immorechner_pass@db:3306/immorechner?serverVersion=mariadb-11.7.1&charset=utf8mb4"
# CORS Configuration
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
# Routing Configuration
DEFAULT_URI=http://localhost

19
.gitignore vendored
View File

@@ -6,9 +6,11 @@
.idea_modules/
out/
# Claude AI
.claude/
# Composer
/vendor/
composer.lock
composer.phar
# PHP
@@ -18,14 +20,17 @@ composer.phar
php_errors.log
# Environment files
.env
.env.local
.env.*.local
.env.dev
.env.test
.env.prod
# OS files
.DS_Store
Thumbs.db
desktop.ini
nul
# Temporary files
*.tmp
@@ -69,3 +74,13 @@ clover.xml
# Docker
docker-compose.override.yml
.dockerignore
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

View File

@@ -1,4 +1,4 @@
FROM php:8.3-apache
FROM php:8.4-apache
# Install system dependencies
RUN apt-get update && apt-get install -y \
@@ -7,13 +7,21 @@ RUN apt-get update && apt-get install -y \
libpng-dev \
libonig-dev \
libxml2-dev \
libicu-dev \
zip \
unzip \
libzip-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mysqli mbstring exif pcntl bcmath gd zip
# Install PHP extensions for Symfony
RUN docker-php-ext-configure intl \
&& docker-php-ext-install pdo_mysql mysqli mbstring exif pcntl bcmath gd zip intl opcache
# Configure opcache for Symfony
RUN echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo "opcache.memory_consumption=256" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo "opcache.max_accelerated_files=20000" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo "opcache.validate_timestamps=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
# Enable Apache mod_rewrite
RUN a2enmod rewrite

View File

@@ -1,5 +1,3 @@
version: '3.8'
services:
web:
build:

View File

@@ -1,22 +1,20 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
DocumentRoot /var/www/html/public
<Directory /var/www/html>
Options Indexes FollowSymLinks
<Directory /var/www/html/public>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
FallbackResource /index.php
</Directory>
# Enable mod_rewrite
RewriteEngine On
# Symfony recommended: disable .htaccess if using FallbackResource
<Directory /var/www/html/public/bundles>
FallbackResource disabled
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# Optional: Disable directory listing
<Directory /var/www/html>
Options -Indexes +FollowSymLinks
</Directory>
</VirtualHost>