Files
monacousa-portal/Dockerfile
Matt df1ff15975
All checks were successful
Build And Push Image / docker (push) Successful in 2m50s
Enhance member deletion and implement template-based email system
- Add Keycloak user deletion to member removal process
- Implement Handlebars email templates for verification, password reset, and dues reminders
- Improve JWT secret configuration with multiple fallbacks
- Add getMemberById function and enhance error handling
- Update Dockerfile to include email templates in production build
2025-08-09 17:36:35 +02:00

35 lines
966 B
Docker

ARG NODE_VERSION=22.12.0
ARG PORT=6060
FROM node:${NODE_VERSION}-slim as base
ENV NODE_ENV=production
ENV NODE_OPTIONS=--max-old-space-size=8192
WORKDIR /app
FROM base as build
COPY package.json .
COPY package-lock.json .
RUN npm install --production=false
COPY . .
RUN npm run build
RUN npm prune
FROM base as production
ENV PORT=$PORT
COPY --from=build /app/.output /app/.output
COPY --from=build /app/server/templates /app/server/templates
# Copy debug entrypoint script
COPY docker-entrypoint-debug.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint-debug.sh
# Add health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:6060/api/health || exit 1
# Install curl and net-tools for health check and debugging
RUN apt-get update && apt-get install -y curl net-tools wget && rm -rf /var/lib/apt/lists/*
# Use debug entrypoint
ENTRYPOINT ["/usr/local/bin/docker-entrypoint-debug.sh"]