FROM python:3-alpine as base WORKDIR /app # Code from https://github.com/nginxinc/docker-nginx/blob/4bf0763f4977fff7e9648add59e0540088f3ca9f/stable/alpine-slim/Dockerfile ENV NGINX_VERSION 1.25.3 ENV PKG_RELEASE 1 COPY compose/nginx/install.sh / RUN /bin/sh /install.sh \ && rm /install.sh # Python part COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt gunicorn COPY service service COPY compose/docker-entrypoint.sh / COPY compose/nginx/default.conf /etc/nginx/conf.d/ COPY compose/nginx/docker-entrypoint.d /docker-entrypoint.d COPY assets /usr/share/nginx/html ENTRYPOINT ["/docker-entrypoint.sh"] EXPOSE 80 STOPSIGNAL SIGTERM #CMD ["gunicorn", "-c", "/app/service/gunicorn.py"] CMD ["uvicorn", "service.app:app", "--host", "0.0.0.0", "--port", "5000", "--proxy-headers", "--no-server-header"]