docs: add deployment playbooks and templates

This commit is contained in:
2026-07-19 18:02:47 +00:00 Unverified
commit b59d1df970
124 changed files with 2005 additions and 0 deletions
@@ -0,0 +1,11 @@
FROM oven/bun:1.3.14-alpine AS builder
WORKDIR /app
COPY . .
RUN bun install --frozen-lockfile
RUN bun build --compile --outfile #APP_NAME-backend src/index.ts
FROM alpine:3.22
WORKDIR /app
RUN apk add --no-cache libstdc++ libgcc
COPY --from=builder /app/#APP_NAME-backend ./#APP_NAME-backend
CMD ["./#APP_NAME-backend"]
@@ -0,0 +1,12 @@
# Backend Variant
Use this variant when the repo contains a separate background service or API alongside the main Next.js app.
Typical examples:
1. job worker
2. queue consumer
3. bot bridge
4. internal Bun API
Share the same secret only when both components truly need the same runtime configuration.
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: #APP_NAME-backend
spec:
replicas: 1
selector:
matchLabels:
app: #APP_NAME-backend
template:
metadata:
labels:
app: #APP_NAME-backend
spec:
containers:
- name: #APP_NAME-backend
image: #IMAGE:backend
imagePullPolicy: Always
envFrom:
- secretRef:
name: #SECRET_NAME