Add Dockerfile for multi-stage build setup
This commit is contained in:
19
server/Dockerfile
Normal file
19
server/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM oven/bun:latest AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .
|
||||
|
||||
RUN bun install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN bun run ci-build:dist
|
||||
|
||||
FROM oven/bun:latest AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/dist .
|
||||
|
||||
CMD ["bun", "run", "src/index.ts"]
|
||||
Reference in New Issue
Block a user