mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:01:08 +02:00
fix(calendar): fix Dockerfile healthcheck ports and add ENCRYPTION_KEY to prod
- Backend/Web Dockerfiles: use PORT env var in healthcheck (was hardcoded) - Web Dockerfile: align default port to 5012 (matching docker-compose) - docker-compose.macmini.yml: add ENCRYPTION_KEY env var for calendar-backend Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
32c6f099b1
commit
a39e4ca7f7
3 changed files with 11 additions and 10 deletions
|
|
@ -78,12 +78,13 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|||
|
||||
WORKDIR /app/apps/calendar/apps/backend
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3014
|
||||
# Default port (overridden by PORT env var in docker-compose)
|
||||
ENV PORT=3014
|
||||
EXPOSE ${PORT}
|
||||
|
||||
# Health check
|
||||
# Health check using PORT env var
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3014/api/v1/health || exit 1
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT}/health || exit 1
|
||||
|
||||
# Run entrypoint script
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
|
|
|||
|
|
@ -78,17 +78,16 @@ COPY --from=builder /app/apps/calendar/apps/web/node_modules ./node_modules
|
|||
COPY --from=builder /app/apps/calendar/apps/web/build ./build
|
||||
COPY --from=builder /app/apps/calendar/apps/web/package.json ./
|
||||
|
||||
# Expose port
|
||||
EXPOSE 5186
|
||||
|
||||
# Set environment variables
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=5186
|
||||
ENV PORT=5012
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
# Health check
|
||||
EXPOSE ${PORT}
|
||||
|
||||
# Health check using PORT env var
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:5186/health || exit 1
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT}/health || exit 1
|
||||
|
||||
# Run the app
|
||||
CMD ["node", "build"]
|
||||
|
|
|
|||
|
|
@ -347,6 +347,7 @@ services:
|
|||
MANA_CORE_AUTH_URL: http://mana-auth:3001
|
||||
CORS_ORIGINS: https://calendar.mana.how,https://mana.how
|
||||
ADMIN_SERVICE_KEY: ${MANA_CORE_SERVICE_KEY}
|
||||
ENCRYPTION_KEY: ${CALENDAR_ENCRYPTION_KEY:-}
|
||||
ports:
|
||||
- "3032:3032"
|
||||
healthcheck:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue