From 201a7d89d841f218a32f136afde4853308826aa7 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Thu, 29 Jan 2026 14:08:53 -0500 Subject: [PATCH] build: update Dockerfile for TypeScript compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add npm run build:ts step to compile TypeScript - Copy web/ directory instead of cmd/server/static/ - Build pipeline now: Go deps → CSS → HTMX → TypeScript → Go binary - TypeScript compiles to JavaScript before final image build Integrates TypeScript compilation into container build process. --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61cfa91..0296618 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,9 @@ RUN cd templates && templ generate RUN npm run build:css:prod RUN npm run postinstall +# Build TypeScript to JavaScript +RUN npm run build:ts + # Build the application RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./cmd/server @@ -50,8 +53,8 @@ COPY --from=builder /app/database/schema ./database/schema # Copy generated templates COPY --from=builder /app/templates ./templates -# Copy static assets -COPY --from=builder /app/cmd/server/static ./static +# Copy web assets (HTML, CSS, JS, etc.) +COPY --from=builder /app/web ./web # Expose port EXPOSE 8765