-
-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add support for Python 3.11 (#312)
- Loading branch information
Showing
6 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM tiangolo/uwsgi-nginx:python3.11 | ||
|
||
LABEL maintainer="Sebastian Ramirez <[email protected]>" | ||
|
||
# Install requirements | ||
COPY requirements.txt /tmp/requirements.txt | ||
RUN pip install --no-cache-dir -r /tmp/requirements.txt | ||
|
||
# URL under which static (not modified by Python) files will be requested | ||
# They will be served by Nginx directly, without being handled by uWSGI | ||
ENV STATIC_URL /static | ||
# Absolute path in where the static files wil be | ||
ENV STATIC_PATH /app/static | ||
|
||
# If STATIC_INDEX is 1, serve / with /static/index.html directly (or the static URL configured) | ||
# ENV STATIC_INDEX 1 | ||
ENV STATIC_INDEX 0 | ||
|
||
# Add demo app | ||
COPY ./app /app | ||
WORKDIR /app | ||
|
||
# Make /app/* available to be imported by Python globally to better support several use cases like Alembic migrations. | ||
ENV PYTHONPATH=/app | ||
|
||
# Move the base entrypoint to reuse it | ||
RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh | ||
# Copy the entrypoint that will generate Nginx additional configs | ||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
# Run the start script provided by the parent image tiangolo/uwsgi-nginx. | ||
# It will check for an /app/prestart.sh script (e.g. for migrations) | ||
# And then will start Supervisor, which in turn will start Nginx and uWSGI | ||
CMD ["/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters