Skip to content
Snippets Groups Projects
Commit 4e159d64 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed probes and NODE_ENV

parent 27fb274f
No related branches found
No related tags found
No related merge requests found
Pipeline #7232 passed
FROM node:19-bullseye as development
ENV NODE_ENV development
RUN mkdir /data && chown 1000:1000 /data
VOLUME ["/data"]
......@@ -10,6 +12,9 @@ CMD [ "bash", "-c", "npm i && npm run dev"]
FROM development as production
ENV TZ Europe/Berlin
ENV NODE_ENV production
ADD pass /app
CMD ["npm", "start"]
\ No newline at end of file
......@@ -56,11 +56,11 @@ spec:
protocol: TCP
livenessProbe:
httpGet:
path: /
path: /healthz
port: http
readinessProbe:
httpGet:
path: /
path: /healthz
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
......
......@@ -20,9 +20,6 @@ services:
target: development
networks:
- metager
environment:
- NODE_ENV=development
- TZ=Europe/Berlin
working_dir: /app
volumes:
- ./pass:/app
......
......@@ -27,6 +27,13 @@ app.use(express.json());
app.use(express.urlencoded({ extended: false, limit: "1mb" }));
app.use(cookieParser());
// Healthcheck URL
app.get("/healthz", (req, res) => {
res.status(200);
res.header({ "Content-Type": "application/json" })
res.send(JSON.stringify({ "status": "OK" }));
})
app.use((req, res, next) => {
res.locals.baseDir = "";
let subPath = req.url.match(/^((\/.*)?\/keys)/);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment