feat: add debug entrypoint script and enhance health check logging
All checks were successful
Build And Push Image / docker (push) Successful in 2m33s
All checks were successful
Build And Push Image / docker (push) Successful in 2m33s
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -18,11 +18,16 @@ FROM base as production
|
||||
ENV PORT=$PORT
|
||||
COPY --from=build /app/.output /app/.output
|
||||
|
||||
# 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 for health check
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
# 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/*
|
||||
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
# Use debug entrypoint
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint-debug.sh"]
|
||||
|
||||
Reference in New Issue
Block a user