Files
llm-intelligence/Dockerfile
phamnazage-jpg 77e6610fd2
Some checks failed
CI / test (push) Has been cancelled
chore: prepare repository for publishing
2026-05-13 14:42:45 +08:00

23 lines
591 B
Docker

FROM golang:1.22-alpine AS backend-builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o bin/server ./cmd/server
FROM node:20-alpine AS frontend-builder
WORKDIR /app
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM alpine:3.19 AS runner
RUN apk add --no-cache ca-certificates postgresql-client
WORKDIR /app
COPY --from=backend-builder /app/bin/server ./
COPY --from=frontend-builder /app/dist ./frontend/dist
COPY db/migrations ./db/migrations
COPY scripts ./scripts
EXPOSE 8080
CMD ["./server"]