WIP
This commit is contained in:
@@ -1,18 +1,37 @@
|
||||
FROM node:20.19.1-alpine AS builder
|
||||
FROM node:20.19.1-slim AS builder
|
||||
|
||||
WORKDIR /app/builder
|
||||
|
||||
COPY . .
|
||||
COPY package*.json .
|
||||
COPY packages/shared-dtos/package*.json ./packages/shared-dtos/
|
||||
# COPY data-hub/data-connector/package*.json ./data-hub/data-connector/
|
||||
COPY app-hub/dashboard/package*.json ./app-hub/dashboard/
|
||||
|
||||
RUN npm install \
|
||||
&& npm run build
|
||||
ENV LIBC=glibc
|
||||
ENV npm_config_arch=x64
|
||||
ENV npm_config_platform=linux
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
make \
|
||||
g++ \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN npm ci --verbose
|
||||
|
||||
COPY packages/shared-dtos ./packages/shared-dtos/
|
||||
COPY app-hub/dashboard ./app-hub/dashboard/
|
||||
|
||||
WORKDIR /app/builder/app-hub/dashboard
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.19.2
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
COPY --from=builder /app/builder/dist/dashboard/browser ./
|
||||
COPY --from=builder /app/builder/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=builder /app/builder/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
COPY --from=builder /app/builder/app-hub/dashboard/dist/dashboard/browser ./
|
||||
COPY --from=builder /app/builder/app-hub/dashboard/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=builder /app/builder/app-hub/dashboard/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user