From 03b6cac13e249c8b7cf461bff2d2e40980fbd54d Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sat, 14 Feb 2026 10:06:35 -0800 Subject: fix: update Dockerfile to use Go embed and fix build path (fixing NK-sk6pym) --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index a69379c..38a28dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,19 +8,22 @@ RUN npm run build # Stage 2: Backend Build FROM golang:1.24-bullseye AS backend-builder -RUN go install github.com/GeertJohan/go.rice/rice@latest - WORKDIR /app COPY go.mod go.sum ./ RUN go mod download - COPY . . + # Copy built frontend assets from Stage 1 -COPY --from=frontend-builder /app/frontend/dist ./frontend/dist +# Ensure the target directory structure matches what embed expects in web/web.go +RUN mkdir -p web/dist/v2 +COPY --from=frontend-builder /app/frontend/dist ./web/dist/v2 + +# Copy vanilla assets +RUN mkdir -p web/dist/vanilla +COPY vanilla/index.html vanilla/app.js vanilla/style.css ./web/dist/vanilla/ -# Embed assets and build the binary -RUN rice -i ./web embed-go -RUN go build -o neko . +# Build the binary +RUN go build -o neko ./cmd/neko # Stage 3: Final Image FROM debian:bullseye-slim -- cgit v1.2.3