Fix drizzle-kit push in deploy by installing it in runtime image

This commit is contained in:
2026-03-13 19:07:11 +01:00
parent 348e1ff832
commit 622418c6b0
2 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ jobs:
docker compose build
docker compose up -d
docker compose exec app bunx drizzle-kit push --force
docker compose exec app drizzle-kit push --force
else
cd /opt/esports-staging
git fetch origin staging
@@ -39,5 +39,5 @@ jobs:
docker compose -f docker-compose.staging.yml --env-file .env.staging -p esports-staging build
docker compose -f docker-compose.staging.yml --env-file .env.staging -p esports-staging up -d
docker compose -f docker-compose.staging.yml --env-file .env.staging -p esports-staging exec staging-app bunx drizzle-kit push --force
docker compose -f docker-compose.staging.yml --env-file .env.staging -p esports-staging exec staging-app drizzle-kit push --force
fi

View File

@@ -14,10 +14,10 @@ ENV NODE_ENV=production
ENV BETTER_AUTH_SECRET=build-placeholder
RUN --mount=type=cache,target=/app/.svelte-kit bun run build
# Runtime — prod deps only
# Runtime — prod deps + drizzle-kit for migrations
FROM base AS runtime
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile --production
RUN bun install --frozen-lockfile --production && bun add drizzle-kit drizzle-orm
COPY --from=build /app/build build
COPY drizzle.config.ts ./
COPY src/lib/server/db/schema.ts src/lib/server/db/auth.schema.ts src/lib/server/db/