diff --git a/interfaces/tsconfig.json b/interfaces/tsconfig.json index e79f0d31c3..c5477c7387 100644 --- a/interfaces/tsconfig.json +++ b/interfaces/tsconfig.json @@ -10,6 +10,7 @@ "sourceMap": true, "outDir": "dist/", "emitDecoratorMetadata": true, + "skipLibCheck": true, "experimentalDecorators": true, "esModuleInterop": true, "declaration": true diff --git a/web-proxy/Dockerfile.ci b/web-proxy/Dockerfile.ci index 026694fbdc..09d603cb43 100644 --- a/web-proxy/Dockerfile.ci +++ b/web-proxy/Dockerfile.ci @@ -1,19 +1,21 @@ -FROM node:16 as frontendBuilder -WORKDIR /usr/interfaces +FROM node:16 AS interfacesModuleBuilder +WORKDIR /usr/local/interfaces COPY ./interfaces/package*.json ./ COPY ./interfaces/tsconfig*.json ./ ADD ./interfaces/src ./src/. RUN npm install RUN npm pack + +FROM node:16 as frontendBuilder WORKDIR /usr/local/frontend COPY ./frontend/. /usr/local/frontend -RUN npm install /usr/interfaces/guardian-interfaces-*.tgz -RUN npm install +COPY --from=interfacesModuleBuilder /usr/local/interfaces/guardian-interfaces-*.tgz ./ +RUN npm install guardian-interfaces-*.tgz RUN npm run build:prod FROM nginx:1.25.1 ENV PLATFORM="docker" -COPY ./web-proxy/configs/image.conf /etc/nginx/templates/default.conf.template +COPY ./web-proxy/configs/default.conf /etc/nginx/conf.d/default.conf COPY --from=frontendBuilder /usr/local/frontend/dist/guardian /usr/share/nginx/html EXPOSE 80 diff --git a/web-proxy/Dockerfile.demo b/web-proxy/Dockerfile.demo index edbd42e904..fba4a5ef68 100644 --- a/web-proxy/Dockerfile.demo +++ b/web-proxy/Dockerfile.demo @@ -1,19 +1,21 @@ -FROM node:16 as frontendBuilder -WORKDIR /usr/interfaces +FROM node:16 AS interfacesModuleBuilder +WORKDIR /usr/local/interfaces COPY ./interfaces/package*.json ./ COPY ./interfaces/tsconfig*.json ./ ADD ./interfaces/src ./src/. RUN npm install RUN npm pack + +FROM node:16 as frontendBuilder WORKDIR /usr/local/frontend COPY ./frontend/. /usr/local/frontend -RUN npm install /usr/interfaces/guardian-interfaces-*.tgz -RUN npm install +COPY --from=interfacesModuleBuilder /usr/local/interfaces/guardian-interfaces-*.tgz ./ +RUN npm install guardian-interfaces-*.tgz RUN npm run build:demo FROM nginx:1.25.1 ENV PLATFORM="docker" -COPY ./web-proxy/configs/demo.conf /etc/nginx/templates/default.conf.template +COPY ./web-proxy/configs/default.conf /etc/nginx/conf.d/default.conf COPY --from=frontendBuilder /usr/local/frontend/dist/guardian /usr/share/nginx/html EXPOSE 80