|
|
@@ -23,8 +23,8 @@ WORKDIR /app
|
|
|
ENV NODE_ENV=production
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
|
|
-# Install su-exec for dropping privileges in entrypoint
|
|
|
-RUN apk add --no-cache su-exec
|
|
|
+# Install su-exec and curl (for healthcheck)
|
|
|
+RUN apk add --no-cache su-exec curl
|
|
|
|
|
|
# Create non-root user
|
|
|
RUN addgroup --system --gid 1001 nodejs && \
|
|
|
@@ -54,4 +54,7 @@ EXPOSE 3000
|
|
|
ENV HOSTNAME=0.0.0.0
|
|
|
ENV PORT=3000
|
|
|
|
|
|
+HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
|
+ CMD curl -f http://localhost:3000/ || exit 1
|
|
|
+
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|