Déploiement CapRover : site statique construit sur le PC, servi par Caddy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-02 20:37:00 +01:00
co-authored by Claude Opus 5.5
parent 14d1186e84
commit 84998608d5
8 changed files with 268 additions and 2 deletions
+39
View File
@@ -0,0 +1,39 @@
# Serveur statique d'Ustagammon. CapRover fournit le HTTPS devant ; ici on
# écoute en HTTP sur le port 80 du conteneur.
{
admin off
auto_https off
}
:80 {
root * /srv
# Types compressés : ceux de Caddy par défaut, plus les données du moteur
# (application/octet-stream, 8,7 Mo, 7,2 Mo compressés).
encode {
zstd
gzip
match {
header Content-Type text/*
header Content-Type application/json*
header Content-Type application/javascript*
header Content-Type application/wasm*
header Content-Type application/octet-stream*
header Content-Type application/manifest+json*
header Content-Type image/svg+xml*
}
}
# Les noms de fichiers ne changent pas d'une version à l'autre : le
# navigateur revalide chaque fichier (ETag) au lieu de garder une copie
# périmée.
header Cache-Control "no-cache"
header X-Content-Type-Options "nosniff"
header Referrer-Policy "no-referrer"
# Données du moteur (Emscripten) : extension inconnue de Caddy, qui
# devinerait text/xml d'après le début du fichier.
@engine_data path *.data
header @engine_data Content-Type "application/octet-stream"
file_server
}
+9
View File
@@ -0,0 +1,9 @@
# Image de production d'Ustagammon : un serveur statique (Caddy) et le site
# déjà construit et testé sur le PC (make site). Rien n'est compilé sur le
# serveur : voir docs/deploiement.md.
FROM caddy:2.8.4-alpine
COPY Caddyfile /etc/caddy/Caddyfile
COPY site/ /srv/
EXPOSE 80
+1
View File
@@ -0,0 +1 @@
{"schemaVersion": 2, "dockerfilePath": "./Dockerfile"}