Backend: - Add file_handlers.go: presigned upload/download for item attachments - Add item_files.go: item file and thumbnail DB operations - Add migration 011: item_files table and thumbnail_key column - Update items/projects/relationships DB with extended field support - Update routes: React SPA serving from web/dist, file upload endpoints - Update auth handlers and middleware for cookie + bearer token auth - Remove Go HTML templates (replaced by React SPA) - Update storage client for presigned URL generation Frontend: - Add TagInput component for tag/keyword entry - Add SVG assets for Silo branding and UI icons - Update API client and types for file uploads, auth, extended fields - Update AuthContext for session-based auth flow - Update LoginPage, ProjectsPage, SchemasPage, SettingsPage - Fix tsconfig.node.json Deployment: - Update config.prod.yaml: single-binary SPA layout at /opt/silo - Update silod.service: ReadOnlyPaths for /opt/silo - Add scripts/deploy.sh: build, package, ship, migrate, start - Update docker-compose.yaml and Dockerfile - Add frontend-spec.md design document
26 lines
676 B
Docker
26 lines
676 B
Docker
FROM node:22-alpine AS frontend
|
|
WORKDIR /app
|
|
COPY web/package.json web/package-lock.json ./
|
|
RUN npm ci
|
|
COPY web/ ./
|
|
RUN npm run build
|
|
|
|
FROM golang:1.24-alpine AS builder
|
|
RUN apk add --no-cache git
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
COPY --from=frontend /app/dist ./web/dist
|
|
RUN CGO_ENABLED=0 go build -o /silod ./cmd/silod
|
|
RUN CGO_ENABLED=0 go build -o /silo ./cmd/silo
|
|
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates wget
|
|
COPY --from=builder /silod /usr/local/bin/silod
|
|
COPY --from=builder /silo /usr/local/bin/silo
|
|
COPY --from=frontend /app/dist /var/www/silo
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["silod"]
|
|
CMD ["-config", "/etc/silo/config.yaml"]
|