23 lines
712 B
Docker
23 lines
712 B
Docker
FROM oven/bun:1 AS frontend
|
|
WORKDIR /app/frontend
|
|
COPY frontend/ .
|
|
RUN bun install && bun run build
|
|
|
|
FROM golang:1.24-alpine AS backend
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /paliad ./cmd/server
|
|
|
|
FROM alpine:3.21
|
|
# poppler-utils provides pdftoppm — used by the truthful base-preview render
|
|
# (PDF→PNG per page) in the S4 preview pipeline (t-paliad-370). If absent, the
|
|
# preview gracefully falls back to the structural HTML render.
|
|
RUN apk add --no-cache ca-certificates openssh-client poppler-utils
|
|
WORKDIR /app
|
|
COPY --from=backend /paliad /app/paliad
|
|
COPY --from=frontend /app/frontend/dist /app/dist
|
|
EXPOSE 8080
|
|
CMD ["/app/paliad"]
|