This commit is contained in:
2026-03-06 19:42:15 +00:00
parent abcbe3e1e5
commit 04cbb846d1
99 changed files with 11724 additions and 0 deletions

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
# Stage 1: Build frontend
FROM oven/bun:latest AS frontend-build
WORKDIR /app/frontend
COPY frontend/package.json frontend/bun.lock* ./
RUN bun install --frozen-lockfile
COPY frontend/ ./
RUN bun run build
# Stage 2: Build backend
FROM golang:1.24-alpine AS backend-build
WORKDIR /app/backend
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ ./
# Copy frontend dist into the embed location
COPY --from=frontend-build /app/frontend/dist ./cmd/server/frontend_dist/
# Copy migrations into the embed location
COPY backend/migrations/*.sql ./cmd/server/migrations/
RUN CGO_ENABLED=0 go build -o /server ./cmd/server
# Stage 3: Final image
FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=backend-build /server /server
EXPOSE 8080
CMD ["/server"]