diff --git a/.drone.yml b/.drone.yml index 861b562..e1f8158 100644 --- a/.drone.yml +++ b/.drone.yml @@ -122,11 +122,13 @@ steps: from_secret: k3s_ssh_password envs: - drone_tag + - drone_commit_sha port: 22 command_timeout: 2m script: - export TAG=$DRONE_TAG - export NAME=$(echo $DRONE_TAG | tr -d '.') + - export COMMIT=$DRONE_COMMIT_SHA - envsubst < /home/debian/manifest.yml | sudo kubectl apply -f - --- @@ -168,4 +170,5 @@ steps: script: - export TAG=$(echo $DRONE_COMMIT_SHA | cut -c1-8) - export NAME=$TAG + - export COMMIT=$DRONE_COMMIT_SHA - envsubst < /home/debian/manifest.yml | sudo kubectl apply -f - diff --git a/apps/server/src/app.ts b/apps/server/src/app.ts index 543156a..0a7e86a 100644 --- a/apps/server/src/app.ts +++ b/apps/server/src/app.ts @@ -87,6 +87,11 @@ app.get("/health", (_, res) => { 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) app.post("/api/ai/test", async (req, res) => { try {