-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (19 loc) · 702 Bytes
/
Dockerfile
File metadata and controls
30 lines (19 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:20-slim AS builder
WORKDIR /app
COPY package.json bun.lockb ./
RUN npm install -g bun && bun install --frozen-lockfile
COPY . .
RUN bun next build
FROM node:20-slim AS runner
WORKDIR /app
COPY --from=builder /app/.next .next
COPY --from=builder /app/public public
COPY --from=builder /app/package.json .
COPY --from=builder /app/bun.lockb .
COPY --from=builder /app/drizzle drizzle
COPY --from=builder /app/src/schema src/schema
COPY --from=builder /app/drizzle.config.ts drizzle.config.ts
RUN npm install -g bun && bun install --frozen-lockfile --production
RUN bun add -g drizzle-kit
EXPOSE 3000
CMD ["sh", "-c", "bun x drizzle-kit push --config=drizzle.config.ts && bun start"]