mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-01-09 14:18:02 -05:00
Update Dockerfile (#336)
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -19,11 +19,22 @@ RUN yarn build
|
||||
# Create image by copying build artifacts
|
||||
FROM node:20-alpine as runner
|
||||
|
||||
# Add curl for HEALTHCHECK
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
USER node
|
||||
|
||||
WORKDIR /home/node
|
||||
COPY --chown=node:node --from=builder /builder/ ./
|
||||
|
||||
ARG PORT=3000
|
||||
# Set PORT env var for next start and expose it
|
||||
ENV PORT=${PORT}
|
||||
EXPOSE ${PORT}
|
||||
|
||||
# Add internal health check
|
||||
# Adjust path (e.g., /api/health) if necessary for your app's health endpoint
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
||||
CMD curl --fail http://localhost:${PORT}/ || exit 1
|
||||
|
||||
CMD ["yarn", "start"]
|
||||
|
||||
Reference in New Issue
Block a user