FROM python:3.9 | |
WORKDIR /fastapi/app | |
RUN apt-get update && apt-get install -y \ | |
nginx \ | |
&& rm -rf /var/lib/apt/lists/* | |
COPY ./requirements.txt /fastapi/requirements.txt | |
RUN pip install --no-cache-dir --upgrade -r /fastapi/requirements.txt | |
COPY ./app /fastapi/app | |
COPY ./default /etc/nginx/sites-available | |
EXPOSE 7860 | |
CMD ["/bin/sh", "/fastapi/app/start.sh"] | |