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 # Symfony Application Configuration
DB_HOST=db APP_ENV=dev
DB_PORT=3306 APP_SECRET=change_this_to_a_random_secret_key
DB_DATABASE=immorechner
DB_USERNAME=immorechner_user
DB_PASSWORD=immorechner_pass
DB_ROOT_PASSWORD=root
# Application Configuration # Database Configuration (MariaDB)
APP_ENV=local DATABASE_URL="mysql://immorechner_user:immorechner_pass@db:3306/immorechner?serverVersion=mariadb-11.7.1&charset=utf8mb4"
APP_DEBUG=true
# 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/ .idea_modules/
out/ out/
# Claude AI
.claude/
# Composer # Composer
/vendor/ /vendor/
composer.lock
composer.phar composer.phar
# PHP # PHP
@@ -18,14 +20,17 @@ composer.phar
php_errors.log php_errors.log
# Environment files # Environment files
.env
.env.local .env.local
.env.*.local .env.*.local
.env.dev
.env.test
.env.prod
# OS files # OS files
.DS_Store .DS_Store
Thumbs.db Thumbs.db
desktop.ini desktop.ini
nul
# Temporary files # Temporary files
*.tmp *.tmp
@@ -69,3 +74,13 @@ clover.xml
# Docker # Docker
docker-compose.override.yml docker-compose.override.yml
.dockerignore .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 # Install system dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
@@ -7,13 +7,21 @@ RUN apt-get update && apt-get install -y \
libpng-dev \ libpng-dev \
libonig-dev \ libonig-dev \
libxml2-dev \ libxml2-dev \
libicu-dev \
zip \ zip \
unzip \ unzip \
libzip-dev \ libzip-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions # Install PHP extensions for Symfony
RUN docker-php-ext-install pdo_mysql mysqli mbstring exif pcntl bcmath gd zip 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 # Enable Apache mod_rewrite
RUN a2enmod rewrite RUN a2enmod rewrite

View File

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

View File

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