feat: import
All checks were successful
web/send/pipeline/head This commit looks good

This commit is contained in:
Julien Cabillot
2025-12-18 10:09:38 -05:00
commit 06a31cd59e
12 changed files with 808 additions and 0 deletions

16
pkg/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM docker.io/dunglas/frankenphp:1-php8.5-alpine
LABEL maintainer="Julien Cabillot <dockerimages@cabillot.eu>"
WORKDIR "/app"
# Copy Caddy configuration
COPY --chown=www-data:www-data pkg/files/Caddyfile /etc/frankenphp/Caddyfile
# TODO: necessaire ?
#RUN chown www-data:www-data /data/caddy && \
# chmod 2770 /data/caddy
# Copy application files
COPY --chown=www-data:www-data "../public" "/app"
# TODO: php.ini
USER www-data

38
pkg/files/Caddyfile Normal file
View File

@@ -0,0 +1,38 @@
{
auto_https off
frankenphp
servers {
enable_full_duplex
}
}
:80 {
encode zstd br gzip
root * /app/
route {
handle {
basic_auth {
# Format :
# <username> <caddy hash-password>
import /etc/frankenphp/htpasswd
}
try_files {path} {path}/index.html /index.php?{query}
php_server
file_server
}
}
# Security headers
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
Referrer-Policy "strict-origin-when-cross-origin"
}
}