2026-01-09 00:16:46 +02:00
|
|
|
FROM node:22-alpine AS studio
|
|
|
|
|
WORKDIR /app/studio
|
|
|
|
|
COPY studio/package*.json ./
|
|
|
|
|
RUN npm ci
|
|
|
|
|
COPY studio/ ./
|
|
|
|
|
RUN npm run build
|
|
|
|
|
|
2026-01-09 02:49:21 +02:00
|
|
|
FROM golang:1.24-alpine AS builder
|
2026-01-09 00:16:46 +02:00
|
|
|
WORKDIR /app
|
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
|
RUN go mod download
|
|
|
|
|
COPY . .
|
|
|
|
|
COPY --from=studio /app/studio/dist ./studio/dist
|
|
|
|
|
RUN CGO_ENABLED=0 go build -o writekit .
|
|
|
|
|
|
|
|
|
|
FROM alpine:3.21
|
|
|
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY --from=builder /app/writekit .
|
|
|
|
|
COPY --from=builder /app/internal/db/migrations ./internal/db/migrations
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
CMD ["./writekit"]
|