Initial Docker deployment setup
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM node:25-bookworm-slim AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
||||
|
||||
COPY upstream/HubFrontend/package.json upstream/HubFrontend/package-lock.json upstream/HubFrontend/.npmrc ./
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci
|
||||
|
||||
COPY upstream/HubFrontend/ ./
|
||||
|
||||
ARG ASSETS_BASE=""
|
||||
ARG VITE_USE_MULTIHUB=false
|
||||
ARG VITE_MULTIHUB_DISCOVERY=""
|
||||
ARG VITE_CONFIG_URL
|
||||
|
||||
ENV ASSETS_BASE=${ASSETS_BASE} \
|
||||
VITE_USE_MULTIHUB=${VITE_USE_MULTIHUB} \
|
||||
VITE_MULTIHUB_DISCOVERY=${VITE_MULTIHUB_DISCOVERY} \
|
||||
VITE_CONFIG_URL=${VITE_CONFIG_URL}
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine AS runtime
|
||||
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /build/build/ /usr/share/nginx/html/
|
||||
|
||||
EXPOSE 8080
|
||||
Reference in New Issue
Block a user