update Dockerfile to build new web frontend
@@ -15,7 +15,7 @@ RUN go mod download
RUN go build -o ./bin/shinpuru ./cmd/shinpuru/main.go
# ------------------------------------------------------------
-# --- STAGE 2: Build Web App Package
+# --- STAGE 2.1: Build Web App Package
FROM node:16-alpine AS build-fe
WORKDIR /build
@@ -27,6 +27,18 @@ RUN yarn
RUN npx ng build --configuration production \
--output-path dist
+# ------------------------------------------------------------
+# --- STAGE 2.2: Build Web App Package
+FROM node:16-alpine AS build-fenew
+WORKDIR /build
+
+# Copy web source files
+COPY web.new .
+# Get dependencies
+RUN yarn
+# Build static web app files
+RUN yarn build --base=/beta
+
# ------------------------------------------------------------
# --- STAGE 3: Final runtime environment
FROM alpine:3 AS final
@@ -35,6 +47,7 @@ WORKDIR /app
# Copy build artifacts from previous stages
COPY --from=build-be /build/bin .
COPY --from=build-fe /build/dist web/dist/web
+COPY --from=build-fenew /build/dist web.new/dist/web
# Add CA certificates
RUN apk add ca-certificates
# Prepare directories
