From e60455b49441384738ead43fae48ad21de0348a6 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Mon, 1 Jul 2024 11:06:08 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'daidokoro/Dockerfi?= =?UTF-8?q?le'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daidokoro/Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/daidokoro/Dockerfile b/daidokoro/Dockerfile index 1f6bc31..01383e3 100644 --- a/daidokoro/Dockerfile +++ b/daidokoro/Dockerfile @@ -1,13 +1,18 @@ -FROM node:alpine +FROM node:alpine AS build WORKDIR /usr/src/app -COPY . /usr/src/app - +COPY package.json package-lock.json ./ RUN npm install -g @angular/cli - RUN npm install -EXPOSE 4200 +COPY . . +RUN npm run build -- --configuration=production --base-href='/containers/dorianhodin-daidokoro' + + +FROM nginx:alpine as deploy + +EXPOSE 8080 -ENTRYPOINT ["ng", "serve", "--open"] +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=build /usr/src/app/dist/portofolio/browser/ /usr/share/nginx/html \ No newline at end of file