-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.local
More file actions
29 lines (23 loc) · 843 Bytes
/
Dockerfile.local
File metadata and controls
29 lines (23 loc) · 843 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
# Local verification Dockerfile (no SOPS).
# Mirrors Dockerfile but reads env directly from the runtime environment.
FROM oven/bun:1.3.2-slim AS base
WORKDIR /app
FROM base AS builder
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run prepare
RUN bun run build
FROM base AS executor
WORKDIR /app
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/drizzle.config.ts ./
COPY --from=builder /app/src/lib/env/env.server.ts ./src/lib/env/env.server.ts
COPY --from=builder /app/src/lib/shared/models/schema.ts ./src/lib/shared/models/schema.ts
COPY --from=builder /app/bun.lock ./
RUN bun install --frozen-lockfile
ENV PORT=3000
EXPOSE 3000
CMD ["sh", "-c", "bun drizzle-kit migrate && exec bun build/index.js"]