feat: k3s migration — k8s manifests, Traefik Ingress, CI deploy change

- Remove drizzle stage from Dockerfile (migration moved to k8s Job)
- Add k8s manifests: deployments, services, ingress, HPA, PDB, RBAC
- Replace Swarm deploy in CI with kubectl create job + kubectl set image
- Add k8s trusted origin to better-auth config
- Document all decisions in k8s/README.md
This commit is contained in:
2026-06-19 12:26:15 +00:00 Unverified
parent c842d9efd1
commit 0f2e21ec9a
16 changed files with 371 additions and 22 deletions
-15
View File
@@ -21,21 +21,6 @@ COPY patches ./patches
# Install into cache, then persist into real node_modules
RUN --mount=type=cache,target=/root/.bun bun install --frozen-lockfile
### Stage N: drizzle ###
FROM oven/bun:canary-alpine as drizzle
# Isolation
RUN adduser -Du 1001 container
USER container
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 --chown=1001 ./drizzle.config.ts ./.env ./
COPY --chown=1001 ./lib/db ./lib/db
RUN bun dr push
### Stage 2: builder ###
FROM oven/bun:canary-alpine AS builder