Dockerfile 785 B

1234567891011121314151617181920212223242526
  1. FROM ioiox/python:3.7-buster-uwsgi-nginx
  2. LABEL maintainer="Stille <[email protected]>"
  3. RUN pip install flask requests
  4. COPY ./app /app
  5. WORKDIR /app
  6. # Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations.
  7. ENV PYTHONPATH=/app
  8. # Move the base entrypoint to reuse it
  9. RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh
  10. # Copy the entrypoint that will generate Nginx additional configs
  11. COPY entrypoint.sh /entrypoint.sh
  12. RUN chmod +x /entrypoint.sh
  13. ENTRYPOINT ["/entrypoint.sh"]
  14. # Run the start script provided by the parent image tiangolo/uwsgi-nginx.
  15. # It will check for an /app/prestart.sh script (e.g. for migrations)
  16. # And then will start Supervisor, which in turn will start Nginx and uWSGI
  17. EXPOSE 80
  18. CMD ["/start.sh"]