Rewrite for Kirby

This commit is contained in:
Marcel Kapfer 2024-03-17 22:34:51 +01:00
parent 07201d05de
commit f854d60108
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
116 changed files with 4156 additions and 8875 deletions

25
.devcontainer/Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM php:8.2-apache
# Add composer
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Add PHP extension installer helper
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
# Install system dependencies
RUN apt-get update &&\
apt-get install -y git unzip &&\
apt-get clean && rm -rf /var/lib/apt/lists/*
# Install GD PHP Extension
RUN install-php-extensions gd intl zip
# Enable support for .htacces files
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
# Enable mode_rewrite and mod_headers
RUN a2enmod rewrite headers
# Set UID of web server user to the same as the user on the host maching
# This enables the webserver to create and write files, e.g. sessions.
RUN usermod -u 1000 www-data

View file

@ -0,0 +1,14 @@
version: "3.11"
services:
app:
build: .
ports:
- 8080:80
volumes:
- ../:/var/www/html
mail:
image: axllent/mailpit
ports:
- 8081:8025

11
.devcontainer/vhost.conf Normal file
View file

@ -0,0 +1,11 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>