s
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user