CI/CD + deploy: Gitea Actions -> registry -> Dockge -> NPM (rcai.brasse-pc.eu)
Some checks failed
build-and-push / build (push) Has been cancelled
Some checks failed
build-and-push / build (push) Has been cancelled
Server:
- serverar byggd web-frontend statiskt + SPA-fallback (WEB_DIST)
- host-mountad persistent katalog via DATA_DIR (/srv/docker/agent-helm -> /app/data),
förberedd för framtida db/auth enligt övriga appars konvention
- esbuild-bundle -> dist/server.cjs (en fil, inga node_modules i runtime)
Web:
- WS-URL defaultar till samma origin i prod (wss://rcai.brasse-pc.eu), localhost i dev
Deploy-artefakter:
- Dockerfile: multi-stage, bygger web + bundlar server; --filter utesluter daemon
(ingen node-pty-kompilering); kör som uid 1000 (= brasse på host)
- .gitea/workflows/build.yaml: push master -> bygg arm64 -> push localhost:5000
- deploy/act-runner.{compose,config}.yaml: Gitea Actions-runner i Docker (docker.sock,
job-containrar får värdens docker for build/push)
- deploy/agent-helm.compose.yaml: Dockge-stack (srv_default, expose 8787, data-mount,
x-dockge.urls)
- deploy/DEPLOY.md: full runbook (runner, bygge, stack, NPM, uppdatering, felsökning)
Verifierat lokalt: typecheck rent, server-bundle serverar UI+health+assets+SPA-fallback,
data-dir skapas. Docker-bygget validerat så långt daemonen är nere (filter bekräftat).
This commit is contained in:
@@ -3,7 +3,11 @@ import { ref, computed } from "vue";
|
||||
import { createHelmClient } from "./lib/helm";
|
||||
import TerminalView from "./components/TerminalView.vue";
|
||||
|
||||
const defaultUrl = import.meta.env.VITE_SERVER_WS ?? "ws://localhost:8787";
|
||||
// I dev: peka mot lokal server. I prod (serverad av servern bakom NPM): samma
|
||||
// origin, så bygget funkar på vilken host som helst (t.ex. wss://rcai.brasse-pc.eu).
|
||||
const sameOriginWs = `${location.protocol === "https:" ? "wss" : "ws"}://${location.host}`;
|
||||
const defaultUrl =
|
||||
import.meta.env.VITE_SERVER_WS || (import.meta.env.DEV ? "ws://localhost:8787" : sameOriginWs);
|
||||
const defaultToken = import.meta.env.VITE_AGENT_HELM_TOKEN ?? "";
|
||||
|
||||
const url = ref(localStorage.getItem("helm.url") ?? defaultUrl);
|
||||
|
||||
Reference in New Issue
Block a user