Private
Public Access
1
0

feat: Adding logging solution + alert for mobile phones

This commit is contained in:
gauvainboiche
2026-03-29 12:23:57 +02:00
parent 4eac0f4415
commit 79cf3ca13e
7 changed files with 383 additions and 198 deletions

View File

@@ -1,17 +1,29 @@
FROM node:20-alpine
# Create non-root user/group before switching context
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
WORKDIR /app
# Install dependencies first for better layer caching
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
# Copy application source
COPY server ./server
COPY public ./public
COPY config ./config
# Drop to non-root user
USER appuser
ENV NODE_ENV=production
ENV PORT=8080
ENV CLICK_COOLDOWN_SECONDS=5
EXPOSE 8080
CMD ["node", "server/index.js"]
# Health-check: lightweight wget is available in node:alpine
HEALTHCHECK --interval=15s --timeout=5s --start-period=30s --retries=3 \
CMD wget -qO- http://localhost:8080/api/config > /dev/null || exit 1
CMD ["node", "server/index.js"]