aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-14 10:06:35 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-14 10:06:35 -0800
commit03b6cac13e249c8b7cf461bff2d2e40980fbd54d (patch)
tree8dc45e561814ba012311f236b76172219b4bfef0 /Dockerfile
parenta4997a5fbc65913b55f2215eb3b868693bd76c51 (diff)
downloadneko-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--Dockerfile17
1 files changed, 10 insertions, 7 deletions
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