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 RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/ /fastapi/app/ RUN mkdir -p /.config RUN chown -R 1000 /.config EXPOSE 7860 CMD ["/bin/sh", "/fastapi/app/start.sh"]