feat: add healthcheck to Dockerfile
This commit is contained in:
1 parent
3aa4023c8f
commit
a92baca134
1 file changed
+4
@@ -32,5 +32,9 @@ RUN mkdir -p docs
|
|||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3333
|
EXPOSE 3333
|
||||||
|
|
||||||
|
# Health check
|
||||||
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
||||||
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3333/api/health || exit 1
|
||||||
|
|
||||||
# Default command: run the server (not interactive CLI)
|
# Default command: run the server (not interactive CLI)
|
||||||
CMD ["npm", "run", "server"]
|
CMD ["npm", "run", "server"]
|
||||||
Reference in new issue
Block a user