diff --git a/deploy/appliquer-caddy-perf.sh b/deploy/appliquer-caddy-perf.sh new file mode 100644 index 0000000..02881bd --- /dev/null +++ b/deploy/appliquer-caddy-perf.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Phase 0 perf gastinel.me : Brotli/gzip precompresses + Cache-Control. +# Ne modifie QUE le handle final du bloc "gastinel.me, www.gastinel.me". +# Sauvegarde -> modification -> caddy validate -> reload ; retour arriere si echec. +# Usage (sur cornafsuisse) : sudo bash ~/appliquer-caddy-perf.sh +set -euo pipefail +[ "$(id -u)" = 0 ] || { echo "A lancer avec sudo"; exit 1; } + +CF=/etc/caddy/Caddyfile +BAK="$CF.avant-perf-$(date +%Y%m%d-%H%M%S)" +cp -a "$CF" "$BAK" +echo "Sauvegarde : $BAK" + +python3 - "$CF" <<'PY' +import sys +p = sys.argv[1] +s = open(p).read() +old = "\thandle {\n\t\troot * /srv/gastinel.me\n\t\tfile_server\n\t}\n" +new = ( + "\t# Assets (polices, images) : cache navigateur 30 jours.\n" + "\t# Passer a immutable/1 an quand les noms de fichiers seront hashes.\n" + "\thandle /assets/* {\n" + "\t\theader Cache-Control \"public, max-age=2592000\"\n" + "\t\troot * /srv/gastinel.me\n" + "\t\tfile_server\n" + "\t}\n" + "\n" + "\t# HTML/JSON : revalidation a chaque visite (304 via ETag si inchange).\n" + "\t# Sert les .br/.gz precompresses s'ils existent (sinon encode zstd/gzip).\n" + "\thandle {\n" + "\t\theader Cache-Control \"no-cache\"\n" + "\t\troot * /srv/gastinel.me\n" + "\t\tfile_server {\n" + "\t\t\tprecompressed br gzip\n" + "\t\t}\n" + "\t}\n" +) +n = s.count(old) +if n != 1: + sys.exit("Bloc attendu introuvable ou ambigu (%d) : aucune modification." % n) +open(p, "w").write(s.replace(old, new)) +PY + +if caddy validate --config "$CF" --adapter caddyfile && systemctl reload caddy; then + echo "OK : Caddy recharge." +else + echo "ECHEC : restauration de $BAK" + cp -a "$BAK" "$CF" + systemctl reload caddy || true + exit 1 +fi diff --git a/gws/download/index.html b/gws/download/index.html index b709ef3..cb2c592 100644 --- a/gws/download/index.html +++ b/gws/download/index.html @@ -4,7 +4,7 @@ Télécharger Gastinel Weather Studio (Windows 64-bit) — Canal Officiel - + @@ -13,7 +13,7 @@ - + @@ -252,6 +252,7 @@ body { color: var(--ok); border: 1px solid #b7dfcb; } +.dl-compteur { margin: 10px 0 0; text-align: center; font-size: 13px; opacity: .7; } .dl-size { font-size: 0.82rem; color: var(--grey-500); @@ -502,7 +503,7 @@ body {
- Version 0.4.8 · Canal stable officiel + Version 0.5.6 · Canal stable officiel

Télécharger Gastinel Weather Studio

Compatible Windows 10 et Windows 11 (64-bit) — configuration requise. Déjà installé ? Le paquet de mise à jour .gws se trouve plus bas.

@@ -516,7 +517,7 @@ body {
Nouvelle installation - 3,7 Mo · x64 + 3,6 Mo · x64

Installateur Windows (.exe)

Pour votre première installation sur l'ordinateur
@@ -528,9 +529,10 @@ body {
- + Télécharger l'Installateur (.exe) +
@@ -562,13 +564,10 @@ body {
-

Nouveautés de la version 0.4.8

+

Nouveautés de la version 0.5.6

@@ -580,7 +579,7 @@ body {
Mise à jour rapide - 4,5 Mo · Format .gws + 4,4 Mo · Format .gws

Paquet de Mise à Jour (.gws)

Si vous avez déjà Gastinel Weather Studio
@@ -593,7 +592,7 @@ body {
- + Télécharger le Paquet (.gws) @@ -649,5 +648,16 @@ body { }); })(); + diff --git a/gws/index.html b/gws/index.html index ea72529..e522cad 100644 --- a/gws/index.html +++ b/gws/index.html @@ -425,12 +425,12 @@ body { Icône GWS Gastinel Weather Studio - v0.4.8 + v0.5.6
- Télécharger v0.4.8 + Télécharger v0.5.6 @@ -535,10 +535,10 @@ body { diff --git a/index.html b/index.html index adbc48e..d6f8a8e 100644 --- a/index.html +++ b/index.html @@ -2073,7 +2073,7 @@ body.spa-nav-hidden .spa-nav { display:none; } Icône Gastinel Weather Studio
@@ -3240,7 +3240,7 @@ var Modules={ gws:function(root){ var API_URL = 'https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0'; - var DEFAULT_VERSION = '0.4.0'; + var DEFAULT_VERSION = '0.5.0'; function copyText(text, cb) { if (navigator.clipboard && window.isSecureContext) { diff --git a/index.html.br b/index.html.br index 2c72e4b..630ca52 100644 Binary files a/index.html.br and b/index.html.br differ diff --git a/index.html.gz b/index.html.gz index 9e99059..e2dc82d 100644 Binary files a/index.html.gz and b/index.html.gz differ