add containerFiles
This commit is contained in:
21
Containerfile.migrator
Normal file
21
Containerfile.migrator
Normal file
@@ -0,0 +1,21 @@
|
||||
# Stage 1: Install dependencies
|
||||
FROM docker.io/oven/bun:1.3.3-alpine AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json bun.lock ./
|
||||
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
RUN bun i --frozen-lockfile
|
||||
|
||||
# Stage 2: Build the SvelteKit application
|
||||
FROM docker.io/oven/bun:1.3.3-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
ARG DATABASE_URL
|
||||
ENV DATABASE_URL=$DATABASE_URL
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
CMD ["bun", "--bun", "run", "db:migrate"]
|
||||
|
||||
Reference in New Issue
Block a user