Skip to content

Commit d0085a7

Browse files
committed
update docker build to fix npm issue
1 parent 16469f8 commit d0085a7

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Dockerfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
FROM node:20-alpine AS ui-build
2-
WORKDIR /ui
3-
COPY ui/package*.json ./
4-
RUN npm ci
5-
COPY ui/ ./
6-
RUN npm run build && \
7-
mkdir -p /ui/out && \
8-
mv dist/src/apps/get-me/index.html /ui/out/get-me.html && \
9-
mv dist/src/apps/issue-write/index.html /ui/out/issue-write.html && \
10-
mv dist/src/apps/pr-write/index.html /ui/out/pr-write.html
2+
WORKDIR /app
3+
COPY ui/package*.json ./ui/
4+
RUN cd ui && npm ci
5+
COPY ui/ ./ui/
6+
# Create output directory and build - vite outputs directly to pkg/github/ui_dist/
7+
RUN mkdir -p ./pkg/github/ui_dist && \
8+
cd ui && npm run build
119

1210
FROM golang:1.25.6-alpine AS build
1311
ARG VERSION="dev"
@@ -23,7 +21,7 @@ RUN --mount=type=cache,target=/var/cache/apk \
2321
COPY . .
2422

2523
# Copy built UI assets over the placeholder
26-
COPY --from=ui-build /ui/out/* ./pkg/github/ui_dist/
24+
COPY --from=ui-build /app/pkg/github/ui_dist/* ./pkg/github/ui_dist/
2725

2826
# Build the server
2927
RUN --mount=type=cache,target=/go/pkg/mod \

0 commit comments

Comments
 (0)