diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 10:06:35 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 10:06:35 -0800 |
| commit | 03b6cac13e249c8b7cf461bff2d2e40980fbd54d (patch) | |
| tree | 8dc45e561814ba012311f236b76172219b4bfef0 /Dockerfile | |
| parent | a4997a5fbc65913b55f2215eb3b868693bd76c51 (diff) | |
| download | neko-03b6cac13e249c8b7cf461bff2d2e40980fbd54d.tar.gz neko-03b6cac13e249c8b7cf461bff2d2e40980fbd54d.tar.bz2 neko-03b6cac13e249c8b7cf461bff2d2e40980fbd54d.zip | |
fix: update Dockerfile to use Go embed and fix build path (fixing NK-sk6pym)
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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 |
