From 8571b7a95834b68efe8c65aaf0f7f20327235b01 Mon Sep 17 00:00:00 2001 From: Alix JEUDI--LEMOINE Date: Tue, 27 May 2025 15:08:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20production=20command=20to?= =?UTF-8?q?=20package.json=20&=20run=20in=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Dockerfile | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 26f4e77..e12d352 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,5 +13,5 @@ RUN npm install # Expose port EXPOSE 80 -# Start the application with ng serve -CMD ["ng", "serve", "--host", "0.0.0.0", "--port", "80", "--configuration=production"] \ No newline at end of file +# Start the application +CMD [ "npm", "run", "production" ] \ No newline at end of file diff --git a/package.json b/package.json index 36afca4..57ab6bb 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", - "test": "ng test" + "test": "ng test", + "production": "ng serve --host 0.0.0.0 --port 80 --configuration=production" }, "private": true, "dependencies": {