sonarQ test on PR #1

Merged
andrej merged 15 commits from dev into main 2026-05-12 10:38:22 +00:00
Showing only changes of commit 45f083e6ae - Show all commits

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
# ---- Build stage ----
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json ./
RUN npm install
COPY tsconfig.json ./
COPY src/ ./src/
RUN npm run build && npm prune --omit=dev
# ---- Runtime stage ----
FROM node:20-alpine
WORKDIR /app
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
COPY package.json ./
RUN chown -R appuser:appgroup /app
USER appuser
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD wget -qO- http://localhost:3000/health | grep -q 'UP' || exit 1
CMD ["node", "--require", "./dist/tracing.js", "dist/main"]