- Go API server with PostgreSQL + Redis - AI floor replacement (OpenRouter Gemini) - Product database (10 brands, 3539 products) - Recommendation engine, calculator, articles - Redis async queue + worker pool - Hot product caching, brand view tracking - JWT auth, favorites, projects - Docker deployment ready Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
855 B
Docker
32 lines
855 B
Docker
# ── Build stage ──────────────────────────────────────────
|
|
FROM golang:1.23-alpine AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apk add --no-cache git ca-certificates tzdata
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
|
go build -ldflags="-w -s" -o floorvisualizer .
|
|
|
|
# ── Run stage ────────────────────────────────────────────
|
|
FROM alpine:3.20
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
|
|
COPY --from=builder /build/floorvisualizer .
|
|
COPY --from=builder /build/data ./data
|
|
COPY --from=builder /build/knowledge_images ./knowledge_images
|
|
|
|
RUN mkdir -p outputs uploads static
|
|
|
|
EXPOSE 8099
|
|
|
|
CMD ["./floorvisualizer"]
|