added version endpoint
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-02-25 21:42:21 +01:00
parent d7902deeb4
commit 15804a5605
2 changed files with 8 additions and 0 deletions

View File

@@ -122,11 +122,13 @@ steps:
from_secret: k3s_ssh_password from_secret: k3s_ssh_password
envs: envs:
- drone_tag - drone_tag
- drone_commit_sha
port: 22 port: 22
command_timeout: 2m command_timeout: 2m
script: script:
- export TAG=$DRONE_TAG - export TAG=$DRONE_TAG
- export NAME=$(echo $DRONE_TAG | tr -d '.') - export NAME=$(echo $DRONE_TAG | tr -d '.')
- export COMMIT=$DRONE_COMMIT_SHA
- envsubst < /home/debian/manifest.yml | sudo kubectl apply -f - - envsubst < /home/debian/manifest.yml | sudo kubectl apply -f -
--- ---
@@ -168,4 +170,5 @@ steps:
script: script:
- export TAG=$(echo $DRONE_COMMIT_SHA | cut -c1-8) - export TAG=$(echo $DRONE_COMMIT_SHA | cut -c1-8)
- export NAME=$TAG - export NAME=$TAG
- export COMMIT=$DRONE_COMMIT_SHA
- envsubst < /home/debian/manifest.yml | sudo kubectl apply -f - - envsubst < /home/debian/manifest.yml | sudo kubectl apply -f -

View File

@@ -87,6 +87,11 @@ app.get("/health", (_, res) => {
res.json({ status: "ok" }); res.json({ status: "ok" });
}); });
// Version endpoint
app.get("/version", (_, res) => {
res.json({ version: process.env.VERSION || "unknown", commit: process.env.COMMIT || "unknown" });
});
// AI Test endpoint (for development only) // AI Test endpoint (for development only)
app.post("/api/ai/test", async (req, res) => { app.post("/api/ai/test", async (req, res) => {
try { try {