Dockerfile 783 B

123456789101112131415161718192021222324252627
  1. FROM guysoft/uwsgi-nginx:python3.7
  2. LABEL maintainer="hunshcn <hunsh.cn@gmail.com>"
  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"]