first successful export

This commit is contained in:
2026-02-25 00:27:36 -08:00
parent b70ea7e877
commit 68ccc2f4fc
14 changed files with 163 additions and 207 deletions

24
DockerFile Normal file
View File

@@ -0,0 +1,24 @@
# Stage 1: Build frontend
FROM node:20-alpine AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
COPY frontend/ .
RUN npm run build
# Stage 2: Build Go binary
FROM golang:1.25.7-alpine AS go-builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o server .
# Stage 3: Final image
FROM alpine:latest
RUN apk add --no-cache ffmpeg
WORKDIR /app
COPY --from=go-builder /app/server .
COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
EXPOSE 8080
CMD ["./server"]