fix(ci): wrong layer order
This commit is contained in:
@@ -114,7 +114,7 @@ jobs:
|
||||
kubectl create job db-migrate \
|
||||
--image=mts.dgnr.us:5000/${{ gitea.repository }}:migration-$TAG \
|
||||
-n buzz \
|
||||
-- push
|
||||
-- bun dr push
|
||||
|
||||
# Roll app & backend
|
||||
kubectl set image deployment/app app=mts.dgnr.us:5000/${{ gitea.repository }}:frontend-$TAG -n buzz
|
||||
|
||||
+14
-14
@@ -39,7 +39,20 @@ RUN --mount=type=cache,target=/home/container/.next/cache,uid=1001,gid=1001 \
|
||||
# Fix nextjs caching(bind mount removes it after build process)
|
||||
RUN mkdir -p .next/cache
|
||||
|
||||
### Stage 3: runner ###
|
||||
### Stage 3: migration ###
|
||||
FROM oven/bun:canary-alpine AS migration
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY --from=deps /home/container/node_modules ./node_modules
|
||||
COPY --from=deps /home/container/package*.json ./
|
||||
COPY --from=deps /home/container/bun.lock ./
|
||||
|
||||
COPY drizzle.config.ts ./
|
||||
COPY lib/db/ ./lib/db/
|
||||
|
||||
CMD ["bun", "drizzle-kit"]
|
||||
|
||||
### Stage 4: runner ###
|
||||
FROM oven/bun:canary-alpine AS runner
|
||||
|
||||
# Isolation
|
||||
@@ -54,16 +67,3 @@ RUN cp -r .next/static .next/standalone/,next
|
||||
COPY --from=builder /home/container/.version ./.version
|
||||
|
||||
CMD ["bun", ".next/standalone/server.js"]
|
||||
|
||||
### Stage 4: migration ###
|
||||
FROM oven/bun:canary-alpine AS migration
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY --from=deps /home/container/node_modules ./node_modules
|
||||
COPY --from=deps /home/container/package*.json ./
|
||||
COPY --from=deps /home/container/bun.lock ./
|
||||
|
||||
COPY drizzle.config.ts ./
|
||||
COPY lib/db/ ./lib/db/
|
||||
|
||||
ENTRYPOINT ["bun", "drizzle-kit"]
|
||||
|
||||
Reference in New Issue
Block a user