feat(winnie,newt): front Svelte 5 sur 8888 + ressource dioxus-frontend

- winnie-frontend : build Vite (app/dist) servi par static-web-server sur 8888, aligne avec la ressource Pangolin winnie-frontend (un desaccord = 502, port en cache cote newt)
- newt : nouvelle ressource dioxus-frontend (dioxus.marcpartensky.com)
This commit is contained in:
Hermes Agent
2026-10-11 19:33:30 -04:00
parent 0fac189847
commit ca72d76cbd
2 changed files with 31 additions and 10 deletions
+19 -3
View File
@@ -13,8 +13,10 @@
enable = true;
environmentFile = config.sops.secrets.newt_env.path;
# Ressource publique Winnie : front (Dioxus UI, developpement local :8080).
# Le domaine public sert le front ; le backend est deplace sur api.*.
# Ressource publique Winnie : front Svelte 5 (build statique servi par
# winnie-frontend.service sur 127.0.0.1:8888). Le domaine public sert le
# front ; le backend est sur api.*. Le port doit etre celui du service
# local (8888) : a 8080 le proxy repond 502 (mesure du 09/10/2026).
blueprint.proxy-resources.winnie-frontend = {
name = "winnie-frontend";
protocol = "http";
@@ -23,7 +25,7 @@
targets = [
{
hostname = "127.0.0.1";
port = 8080;
port = 8888;
method = "http";
}
];
@@ -71,6 +73,20 @@
];
};
blueprint.proxy-resources.dioxus-frontend = {
name = "dioxus-frontend";
protocol = "http";
full-domain = "dioxus.marcpartensky.com";
auth.sso-enabled = false;
targets = [
{
hostname = "127.0.0.1";
port = 8888;
method = "http";
}
];
};
blueprint.proxy-resources.novnc-tower = {
name = "vnc";
protocol = "http";
+12 -7
View File
@@ -29,11 +29,16 @@ in {
# projet : sans Garage il echoue, on empeche son demarrage au boot.
systemd.services.winnie-bucket.wantedBy = lib.mkForce [ ];
# Front Dioxus (web statique) : build `app/ui/build.sh` -> app/ui/dist, copie
# dans le store a l'evaluation, servi en loopback ; Pangolin l'expose sur
# winnie.marcpartensky.com. Rebuild du front = relancer build.sh puis switch.
# Front Svelte 5 (web statique, Vite) : `npm run build` dans
# /home/marc/git/winnie/app -> app/dist, copie dans le store a l'evaluation,
# servi en loopback ; Pangolin l'expose sur winnie.marcpartensky.com.
# Rebuild du front = relancer `npm run build` puis un `nixos-rebuild switch`
# (builtins.path est impur : la copie dans le store date de l'evaluation).
# Le port ci-dessous DOIT etre celui de la ressource Pangolin
# `winnie-frontend` dans services/newt : un desaccord donne un 502 sur le
# domaine (le client newt met le port cible en cache, il faut le redemarrer).
systemd.services.winnie-frontend = {
description = "Winnie front (Dioxus web, statique)";
description = "Winnie front (Svelte 5 statique)";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
@@ -41,9 +46,9 @@ in {
ExecStart = lib.concatStringsSep " " [
"${pkgs.static-web-server}/bin/static-web-server"
"--host 127.0.0.1"
"--port 8080"
"--root ${builtins.path { path = /home/marc/git/winnie/app/ui/dist; name = "winnie-ui-dist"; }}"
"--page-fallback ${builtins.path { path = /home/marc/git/winnie/app/ui/dist/index.html; name = "winnie-ui-index.html"; }}"
"--port 8888"
"--root ${builtins.path { path = /home/marc/git/winnie/app/dist; name = "winnie-ui-dist"; }}"
"--page-fallback ${builtins.path { path = /home/marc/git/winnie/app/dist/index.html; name = "winnie-ui-index"; }}"
"--health"
];
Restart = "on-failure";