File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ # Use Node.js Alpine as base image (Bun compatible)
2+ FROM node:20-alpine
3+
4+ # Set working directory
5+ WORKDIR /app
6+
7+ # Install Bun (for package management and runtime)
8+ RUN apk add --no-cache curl bash \
9+ && curl -fsSL https://bun.sh/install | bash \
10+ && mv ~/.bun/bin/bun /usr/local/bin/ \
11+ && mv ~/.bun /usr/local/lib/bun
12+
13+ # Copy package files
14+ COPY package.json bun.lockb ./
15+
16+ # Install dependencies using Bun
17+ RUN bun install --frozen-lockfile
18+
19+ # Copy source code
20+ COPY src/ ./src/
21+ COPY scripts/ ./scripts/
22+ COPY images/ ./images/
23+
24+ # Expose port
25+ EXPOSE 4000
26+
27+ # Set environment variables
28+ ENV PORT=4000
29+ ENV NODE_ENV=production
30+
31+ # Run the application
32+ CMD ["bun" , "run" , "src/server.ts" ]
You can’t perform that action at this time.
0 commit comments