feature(Integrate FE,BE into 1 docker file):
This commit is contained in:
parent
33b74987ab
commit
2ac61c8f38
|
@ -1,4 +1,4 @@
|
||||||
# REact Frontend
|
# React Frontend
|
||||||
FROM node as react-build
|
FROM node as react-build
|
||||||
WORKDIR /frontend
|
WORKDIR /frontend
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@ COPY safeshare-frontend/ ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
RUN npm run build
|
# Start the react app
|
||||||
|
CMD ["npm", "start"]
|
||||||
|
|
||||||
FROM python:3.10 as backend-build
|
FROM python:3.10 as backend-build
|
||||||
|
|
||||||
|
@ -21,13 +22,4 @@ COPY . /code/
|
||||||
|
|
||||||
RUN chmod a+x start.sh
|
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"]
|
CMD ["./start.sh"]
|
Loading…
Reference in New Issue