From 84dabd714c370b460b325adb5806130c4f427ece Mon Sep 17 00:00:00 2001 From: mahek Date: Fri, 25 Jul 2025 17:43:09 +0200 Subject: [PATCH] Fix start commande --- backend/Dockerfile | 4 ++-- frontend/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 4a396b1..e4eb1b2 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -11,5 +11,5 @@ EXPOSE 5000 COPY wait-for-mongodb.sh /wait-for-mongodb.sh RUN chmod +x /wait-for-mongodb.sh -# Start the application with wait script -CMD ["/wait-for-mongodb.sh", "npm", "run", "dev"] +# Install dependencies and start the application +CMD ["sh", "-c", "/wait-for-mongodb.sh && npm install && npm run dev"] diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1241095..31c3c43 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -7,5 +7,5 @@ USER root # Expose port 8012 EXPOSE 8012 -# Start the application -CMD ["npm", "run", "serve"] +# Install dependencies and start the application +CMD ["sh", "-c", "npm install && npm run serve"]