feature(Integrate FE,BE into 1 docker file):
This commit is contained in:
parent
8914c6b356
commit
33b74987ab
|
@ -0,0 +1,33 @@
|
||||||
|
# REact Frontend
|
||||||
|
FROM node as react-build
|
||||||
|
WORKDIR /frontend
|
||||||
|
|
||||||
|
COPY safeshare-frontend/ ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM python:3.10 as backend-build
|
||||||
|
|
||||||
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
|
WORKDIR /code
|
||||||
|
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
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"]
|
Loading…
Reference in New Issue