Add bun support

This commit is contained in:
proitlab committed 2026-07-14 15:15:26 +07:00
1 parent ff54929a54
commit c0a4d0c7e2
2 files changed
+21

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
FROM oven/bun:1-alpine
WORKDIR /app
# Install dependencies first (layer caching)
# bun install is compatible with npm package.json / package-lock.json
COPY package*.json ./
RUN bun install --production
# Copy application source
COPY . .
# Expose proxy REST API port
EXPOSE 4000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD bun -e "require('http').get('http://localhost:4000/health', r => r.statusCode === 200 ? process.exit(0) : process.exit(1)).on('error', () => process.exit(1))"
CMD ["bun", "run", "index.js"]
+1
View File
@@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"start": "node index.js",
"start:bun": "bun run index.js",
"dev": "nodemon index.js"
},
"dependencies": {