Skip to content

Commit 34b521f

Browse files
committed
add dockerfile
1 parent 56dbf4a commit 34b521f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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"]

0 commit comments

Comments
 (0)