This commit is contained in:
Kar
2026-02-28 19:24:42 +05:30
parent 0dd3b9fd62
commit 6e107f7b44
2 changed files with 51 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
# Use Node.js 18 LTS
FROM node:20-alpine
# Install MongoDB CLI tools and curl for import operations and health checks
RUN apk add --no-cache mongodb-tools curl
# Install MongoDB CLI tools, curl, and jq for import operations and health checks
RUN apk add --no-cache mongodb-tools curl jq
# Set working directory
WORKDIR /app
@@ -27,7 +27,7 @@ EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/api/health || exit 1
CMD curl -f http://localhost:3000/api/health | jq -e '.status == "healthy"' || exit 1
# Start the application
CMD ["npm", "start"]