This commit is contained in:
Robert Wartenberg committed 2026-08-19 12:02:01 +02:00
1 parent b3f1d57263
commit 37c03164ea
3 files changed
+30 -1

No files matched your search

+8 -1
View File
@@ -12,11 +12,16 @@ services:
command:
- sh
- -c
- chown -R www-data:www-data /var/www/html/var /var/www/html/system/tmp && chmod 775 /var/www/html/system/tmp && exec apache2-foreground
- chown -R www-data:www-data /var/www/html/var /var/www/html/system/tmp /var/www/html/files /var/www/html/templates /var/www/html/assets/images && chmod 775 /var/www/html/system/tmp && exec apache2-foreground
volumes:
- ./:/var/www/html
- contao_vendor:/var/www/html/vendor
- contao_var:/var/www/html/var
# Contao importiert eigene Templates. Der Windows-Bind-Mount wäre für
# Apache nicht beschreibbar, daher liegt dieses Verzeichnis im Volume.
- contao_templates:/var/www/html/templates
# Contao erzeugt Bildableitungen zur Laufzeit (z. B. deferred images).
- contao_assets_images:/var/www/html/assets/images
# Windows-Bind-Mounts können die POSIX-Schreibrechte für Apache verlieren.
# Contao legt hier beim Import temporäre Dateien ab.
- contao_system_tmp:/var/www/html/system/tmp
@@ -54,4 +59,6 @@ volumes:
mariadb_data:
contao_vendor:
contao_var:
contao_templates:
contao_assets_images:
contao_system_tmp:
+4
View File
@@ -40,6 +40,10 @@
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
# Serve the standalone Perspektivwerk mockup instead of passing the
# directory request to Contao's front controller.
RewriteRule ^perspektivwerk/?$ perspektivwerk/index.html [L]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
@@ -0,0 +1,18 @@
$projectRoot = Split-Path -Parent $PSScriptRoot
$mockupPath = Join-Path $projectRoot 'public\perspektivwerk\index.html'
$htaccessPath = Join-Path $projectRoot 'public\.htaccess'
Describe 'Perspektivwerk static route' {
It 'contains the static mockup entry point' {
(Test-Path -LiteralPath $mockupPath) | Should Be $true
}
It 'routes /perspektivwerk to the static entry point before the Contao fallback' {
$htaccess = Get-Content -LiteralPath $htaccessPath -Raw
$staticRouteIndex = $htaccess.IndexOf('RewriteRule ^perspektivwerk/?$ perspektivwerk/index.html [L]')
$fallbackIndex = $htaccess.IndexOf('RewriteRule ^ %{ENV:BASE}/index.php [L]')
$staticRouteIndex | Should BeGreaterThan -1
$staticRouteIndex | Should BeLessThan $fallbackIndex
}
}