From 2ac61c8f38085fdef628e91f4437ffce5c63cdd3 Mon Sep 17 00:00:00 2001 From: Devoalda Date: Mon, 30 Oct 2023 12:50:50 +0800 Subject: [PATCH] feature(Integrate FE,BE into 1 docker file): --- safeshare/DockerfileFEBE | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/safeshare/DockerfileFEBE b/safeshare/DockerfileFEBE index 6a58076..e8efd1a 100644 --- a/safeshare/DockerfileFEBE +++ b/safeshare/DockerfileFEBE @@ -1,4 +1,4 @@ -# REact Frontend +# React Frontend FROM node as react-build WORKDIR /frontend @@ -6,7 +6,8 @@ COPY safeshare-frontend/ ./ RUN npm install -RUN npm run build +# Start the react app +CMD ["npm", "start"] FROM python:3.10 as backend-build @@ -21,13 +22,4 @@ COPY . /code/ RUN chmod a+x start.sh -# FInal Image -FROM python:3.10 -WORKDIR /code -COPY --from=react-build /frontend/build/ /code/safeshare-frontend/ -COPY --from=backend-build /code/ /code/ - -EXPOSE 3000 -EXPOSE 8000 - CMD ["./start.sh"] \ No newline at end of file