33 lines
512 B
Plaintext
33 lines
512 B
Plaintext
# 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"] |