- Frontend: Next.js 15 (App Router), Auth.js v5, shadcn/ui, MagicUI - Backend: Go + Gin + GORM with layered architecture - Auth: Local credentials login with optional Keycloak OAuth binding - Admin: RBAC user management for admin role - Dev: Docker Compose with hot reload for both frontend and backend - Docker: 3-service orchestration (frontend, backend, postgres) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
459 B
Docker
28 lines
459 B
Docker
FROM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/api/main.go
|
|
|
|
FROM golang:1.25-alpine AS dev
|
|
|
|
RUN go install github.com/air-verse/air@latest
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
EXPOSE 8080
|
|
CMD ["air", "-c", ".air.toml"]
|
|
|
|
FROM alpine:latest AS production
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/server .
|
|
|
|
EXPOSE 8080
|
|
CMD ["./server"]
|