step 9: single image CI/CD, drop FE/BE split
CI pipeline: replace separate FE + BE image builds with single unified Dockerfile. Remove FE_IMAGE, FE_REPLICAS, FE_* resource vars. Simplify build/push/deploy to single IMAGE. Remove frontend.yaml k8s manifest. Remove provider integration test env vars (PROVIDER, PROVIDER_KEY, VENICE_API_KEY). Remove EXTRACTION_CONCURRENCY. Delete server/Dockerfile (backend-only image, superseded by root Dockerfile). Delete k8s/frontend.yaml (no separate FE deployment). Update ROADMAP: steps 5-7 and 9 marked complete. Step 8 (ICD) partial. Step 10 (smoke test + tag) is all that remains for v0.1.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
# ==========================================
|
||||
# Switchboard Core - Backend Dockerfile
|
||||
# ==========================================
|
||||
# Standalone Go API server for cluster deployment.
|
||||
# Build context is the repo root (not ./server).
|
||||
# ==========================================
|
||||
|
||||
# Build stage
|
||||
FROM golang:1.23-bookworm AS builder
|
||||
|
||||
ARG APP_VERSION=dev
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy module files and download deps
|
||||
COPY server/go.mod server/go.sum* ./
|
||||
RUN go mod download
|
||||
|
||||
# Copy source and tidy (resolves any go.sum gaps)
|
||||
COPY server/ .
|
||||
RUN go mod tidy
|
||||
|
||||
# Copy VERSION from repo root — used by ldflags and copied to runtime image.
|
||||
# If APP_VERSION build-arg was supplied by CI, it takes precedence via ldflags.
|
||||
# If not, $(cat VERSION) reads the file directly so the binary always has a real version.
|
||||
COPY VERSION ./
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-s -w -X main.Version=$(cat VERSION)" -o /bin/switchboard .
|
||||
|
||||
# Runtime stage
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /bin/switchboard /usr/local/bin/switchboard
|
||||
COPY --from=builder /app/database/migrations /app/database/migrations
|
||||
|
||||
# VERSION file at /VERSION — version.go init() reads it as fallback for local/dev runs
|
||||
COPY --from=builder /app/VERSION /VERSION
|
||||
|
||||
# Builtin extensions (seeded into DB on startup)
|
||||
COPY extensions/builtin/ /app/extensions/builtin/
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["switchboard"]
|
||||
Reference in New Issue
Block a user