feat: Add healthcheck and dynamic port support in Dockerfile

main
borja (aider) 3 months ago
parent e9be1faa7f
commit 4a01b9094b

@ -11,11 +11,11 @@ COPY src/ ./src/
COPY index.ts ./ COPY index.ts ./
# Health check # Health check
# HEALTHCHECK --interval=30s --timeout=3s \ HEALTHCHECK --interval=30s --timeout=3s \
# CMD curl -f http://localhost:3007/health || exit 1 CMD curl -f http://localhost:${PORT:-3007}/health || exit 1
# Server runs on port 3007 by default # Server runs on port from environment variable
EXPOSE 3007 EXPOSE ${PORT:-3007}
# Start the server # Start the server
CMD ["bun", "run", "index.ts"] CMD ["bun", "run", "index.ts"]

Loading…
Cancel
Save