Add TypeScript migration, image resizing, media upload UX, and multimedia support
All checks were successful
Deploy to NAS / deploy (push) Successful in 2m20s
All checks were successful
Deploy to NAS / deploy (push) Successful in 2m20s
- Migrate static JS to TypeScript (static-ts/ → compiled to internal/api/static/) - Add image resizing on upload: JPEG/PNG/WebP scaled to max 1920px at quality 80 - Extract shared upload logic into upload.go (saveUpload, saveResizedImage, saveResizedWebP) - Add POST /media endpoint for drag-drop/paste media uploads with markdown ref return - Add background music player with video/audio coordination (autoplay.ts) - Add global nav, public feed, hashtags, visibility, Markdown rendering for entries - Add Dockerfile stage for TypeScript compilation (static-ts-builder) - Add goldmark, disintegration/imaging, golang.org/x/image dependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -6,12 +6,23 @@ RUN npm ci
|
||||
COPY webapp/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Build Go server
|
||||
# Stage 2: Compile static TypeScript
|
||||
FROM node:22-alpine AS static-ts-builder
|
||||
WORKDIR /build/backend
|
||||
COPY backend/static-ts/ ./static-ts/
|
||||
RUN mkdir -p ./internal/api/static \
|
||||
&& cd ./static-ts \
|
||||
&& npm ci \
|
||||
&& npm run build
|
||||
|
||||
# Stage 3: Build Go server
|
||||
FROM golang:1.25-alpine AS go-builder
|
||||
WORKDIR /app
|
||||
COPY backend/go.mod backend/go.sum ./
|
||||
RUN go mod download
|
||||
COPY backend/ ./
|
||||
# Inject compiled static JS
|
||||
COPY --from=static-ts-builder /build/backend/internal/api/static/ ./internal/api/static/
|
||||
RUN go test ./...
|
||||
# Inject built SPA into embed path
|
||||
COPY --from=webapp-builder /webapp/dist ./internal/api/webapp/
|
||||
|
||||
Reference in New Issue
Block a user