Set up deployment
This commit is contained in:
+9
-3
@@ -7,11 +7,17 @@ WORKDIR /app
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile --production
|
||||
|
||||
FROM oven/bun:1-alpine AS runner
|
||||
FROM oven/bun:1-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY tsconfig.json ./
|
||||
COPY package.json tsconfig.json ./
|
||||
COPY src ./src
|
||||
|
||||
RUN bun run build
|
||||
|
||||
FROM oven/bun:1-alpine AS runner
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
USER bun
|
||||
CMD ["bun", "src/index.ts"]
|
||||
CMD ["bun", "dist/index.js"]
|
||||
|
||||
Reference in New Issue
Block a user