Switch to modernc.org/sqlite and update dockerfile

This commit is contained in:
2026-05-06 19:00:28 +02:00
parent b28b9b127b
commit e5fd59f3ed
16 changed files with 162 additions and 127 deletions
+35 -10
View File
@@ -1,28 +1,53 @@
FROM golang:1.25-alpine AS builder
# Stage 1: Build frontend
FROM node:20-alpine AS frontend-builder
WORKDIR /app
RUN apk add --no-cache build-base libwebp-dev
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN npm install -g pnpm \
&& pnpm install --frozen-lockfile
COPY frontend .
RUN pnpm run build
# Stage 2: Build backend
FROM golang:1.25-alpine AS backend-builder
WORKDIR /backend
ARG TARGETOS
ARG TARGETARCH
COPY backend/go.mod backend/go.sum ./
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY backend .
RUN go build -tags "fts5" -o quay
RUN CGO_ENABLED=0 \
GOOS=$TARGETOS \
GOARCH=$TARGETARCH \
go build -o server ./
FROM alpine:3.19
# Stage 3: Final image
FROM alpine:latest
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
# backend
COPY --from=backend-builder /backend/server /server
RUN apk add --no-cache libwebp libstdc++
# frontend
COPY --from=frontend-builder /app/dist /app/dist
COPY --from=builder /app/quay .
RUN mkdir -p /config
ENV PORT=4321
ENV CONFIG_DIR=/config
ENV STORAGE_PATH=/storage
ENV STATIC_DASHBOARD_PATH=/app/dist
EXPOSE 4321
CMD ["./quay"]
CMD ["/server"]