diff --git a/development-system/.dockerignore b/development-system/.dockerignore index 5c841d5..965c4b1 100644 --- a/development-system/.dockerignore +++ b/development-system/.dockerignore @@ -3,5 +3,9 @@ node_modules vendor var -public/assets/js +public/assets +public/bundles +public/share +public/system +public/vendor *.log diff --git a/development-system/README.md b/development-system/README.md index a579916..abc4820 100644 --- a/development-system/README.md +++ b/development-system/README.md @@ -16,6 +16,9 @@ Beim ersten Start eines frischen Clones erzeugt Contao die benötigten Laufzeitv docker compose exec app vendor/bin/contao-setup --no-interaction --env=dev docker compose exec app chown -R www-data:www-data var public docker compose exec app vendor/bin/contao-console contao:migrate --no-interaction + +neuen admin account anlegen: +docker compose exec app vendor/bin/contao-console contao:user:create --admin ``` - Website/CMS: @@ -29,10 +32,15 @@ npm install npm run build ``` -**Dann die Seite öffnen:** -http://localhost:8080/perspektivwerk/ +**Seite öffnen:** -## Abgrenzung zur Originalseite +Frontend: http://localhost:8080/default +Backend: http://localhost:8080/contao + + +## HTML Nachbau der Perpektivwerkseite + +http://localhost:8080/perspektivwerk/ Die genaue Contao-, PHP- und Template-Version der öffentlichen Seite ist nicht verlässlich aus dem ausgelieferten HTML ableitbar. Das Setup bildet daher die wahrscheinlichste Komponentenfamilie nach; es ist kein Dump der Produktivinstallation. IONOS/Hosting, Matomo-Konfiguration, Inhalte, Templates und Erweiterungen müssen bei Bedarf separat ergänzt werden. diff --git a/development-system/docker-compose.yml b/development-system/docker-compose.yml index 7f53da8..61b6a4e 100644 --- a/development-system/docker-compose.yml +++ b/development-system/docker-compose.yml @@ -9,10 +9,17 @@ services: APP_ENV: dev CONTAO_ENVIRONMENT: dev DATABASE_URL: mysql://perspektivwerk:perspektivwerk@db:3306/perspektivwerk?serverVersion=mariadb-10.11.0 + 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 volumes: - ./:/var/www/html - contao_vendor:/var/www/html/vendor - contao_var:/var/www/html/var + # 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 depends_on: db: condition: service_healthy @@ -47,3 +54,4 @@ volumes: mariadb_data: contao_vendor: contao_var: + contao_system_tmp: diff --git a/development-system/php-apache/Dockerfile b/development-system/php-apache/Dockerfile index 8ff1bb5..3db43f0 100644 --- a/development-system/php-apache/Dockerfile +++ b/development-system/php-apache/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-install -j"$(nproc)" intl gd mysqli pdo_mysql zip opcache \ && a2enmod rewrite headers expires \ + && echo "memory_limit=256M" > /usr/local/etc/php/conf.d/contao-memory-limit.ini \ && rm -rf /var/lib/apt/lists/* COPY --from=composer:2 /usr/bin/composer /usr/bin/composer @@ -16,7 +17,5 @@ WORKDIR /var/www/html COPY composer.json ./ RUN if [ -f composer.json ]; then composer install --no-interaction --prefer-dist --no-progress; fi -COPY . . - RUN mkdir -p var public/assets \ && chown -R www-data:www-data var public diff --git a/development-system/public/.htaccess b/development-system/public/.htaccess index 21ea5b8..17b7b7f 100644 --- a/development-system/public/.htaccess +++ b/development-system/public/.htaccess @@ -26,10 +26,6 @@ RewriteCond %{HTTP:Authorization} . RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - # Static mockup used during local booking UI development. - RewriteRule ^perspektivwerk/?$ perspektivwerk/index.html [L] - RewriteRule ^(?:index\.html)?$ perspektivwerk/index.html [L] - # Redirect to URI without front controller to prevent duplicate content # (with and without `/index.php`). Only do this redirect on the initial # rewrite by Apache and not on subsequent cycles. Otherwise, we would get an