FloorVisualizer/Dockerfile
dindang 94895cbc22 Initial commit: FloorVisualizer backend
- 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>
2026-07-16 09:47:11 +08:00

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"]