From fcbb161a79d2fe7295f9edcf20d60cefda2b54c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 2 Nov 2024 14:55:50 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A5=20Drop=20support=20for=20Pytho?= =?UTF-8?q?n=203.7=20and=203.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 -- .github/workflows/test.yml | 4 -- docker-images/python3.7.dockerfile | 70 ------------------------------ docker-images/python3.8.dockerfile | 70 ------------------------------ scripts/process_all.py | 2 - 5 files changed, 150 deletions(-) delete mode 100644 docker-images/python3.7.dockerfile delete mode 100644 docker-images/python3.8.dockerfile diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d280575..08e0925 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,10 +23,6 @@ jobs: python_version: "3.10" - name: python3.9 python_version: "3.9" - - name: python3.8 - python_version: "3.8" - - name: python3.7 - python_version: "3.7" fail-fast: true runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a99e06..4e9a8b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,10 +27,6 @@ jobs: python_version: "3.10" - name: python3.9 python_version: "3.9" - - name: python3.8 - python_version: "3.8" - - name: python3.7 - python_version: "3.7" fail-fast: true runs-on: ubuntu-latest steps: diff --git a/docker-images/python3.7.dockerfile b/docker-images/python3.7.dockerfile deleted file mode 100644 index 6dc2024..0000000 --- a/docker-images/python3.7.dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -FROM python:3.7-bullseye - -LABEL maintainer="Sebastian Ramirez " - -ENV PYTHONDONTWRITEBYTECODE=1 -ENV PYTHONUNBUFFERED=1 - -COPY install-nginx-debian.sh / - -RUN bash /install-nginx-debian.sh - -# Install requirements -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -# Remove default configuration from Nginx -RUN rm /etc/nginx/conf.d/default.conf -# Copy the base uWSGI ini file to enable default dynamic uwsgi process number -COPY uwsgi.ini /etc/uwsgi/ - -# Install Supervisord -RUN apt-get update && apt-get install -y supervisor \ -&& rm -rf /var/lib/apt/lists/* -# Custom Supervisord config -COPY supervisord-debian.conf /etc/supervisor/conf.d/supervisord.conf - -# Copy stop-supervisor.sh to kill the supervisor and substasks on app failure -COPY stop-supervisor.sh /etc/supervisor/stop-supervisor.sh -RUN chmod +x /etc/supervisor/stop-supervisor.sh - -# Which uWSGI .ini file should be used, to make it customizable -ENV UWSGI_INI /app/uwsgi.ini - -# By default, run 2 processes -ENV UWSGI_CHEAPER 2 - -# By default, when on demand, run up to 16 processes -ENV UWSGI_PROCESSES 16 - -# By default, allow unlimited file sizes, modify it to limit the file sizes -# To have a maximum of 1 MB (Nginx's default) change the line to: -# ENV NGINX_MAX_UPLOAD 1m -ENV NGINX_MAX_UPLOAD 0 - -# By default, Nginx will run a single worker process, setting it to auto -# will create a worker for each CPU core -ENV NGINX_WORKER_PROCESSES 1 - -# By default, Nginx listens on port 80. -# To modify this, change LISTEN_PORT environment variable. -# (in a Dockerfile or with an option for `docker run`) -ENV LISTEN_PORT 80 - -# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app -COPY start.sh /start.sh -RUN chmod +x /start.sh - -# Copy the entrypoint that will generate Nginx additional configs -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] - -# Add demo app -COPY ./app /app -WORKDIR /app - -# Run the start script, 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"] diff --git a/docker-images/python3.8.dockerfile b/docker-images/python3.8.dockerfile deleted file mode 100644 index 01e4571..0000000 --- a/docker-images/python3.8.dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -FROM python:3.8-bullseye - -LABEL maintainer="Sebastian Ramirez " - -ENV PYTHONDONTWRITEBYTECODE=1 -ENV PYTHONUNBUFFERED=1 - -COPY install-nginx-debian.sh / - -RUN bash /install-nginx-debian.sh - -# Install requirements -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -# Remove default configuration from Nginx -RUN rm /etc/nginx/conf.d/default.conf -# Copy the base uWSGI ini file to enable default dynamic uwsgi process number -COPY uwsgi.ini /etc/uwsgi/ - -# Install Supervisord -RUN apt-get update && apt-get install -y supervisor \ -&& rm -rf /var/lib/apt/lists/* -# Custom Supervisord config -COPY supervisord-debian.conf /etc/supervisor/conf.d/supervisord.conf - -# Copy stop-supervisor.sh to kill the supervisor and substasks on app failure -COPY stop-supervisor.sh /etc/supervisor/stop-supervisor.sh -RUN chmod +x /etc/supervisor/stop-supervisor.sh - -# Which uWSGI .ini file should be used, to make it customizable -ENV UWSGI_INI /app/uwsgi.ini - -# By default, run 2 processes -ENV UWSGI_CHEAPER 2 - -# By default, when on demand, run up to 16 processes -ENV UWSGI_PROCESSES 16 - -# By default, allow unlimited file sizes, modify it to limit the file sizes -# To have a maximum of 1 MB (Nginx's default) change the line to: -# ENV NGINX_MAX_UPLOAD 1m -ENV NGINX_MAX_UPLOAD 0 - -# By default, Nginx will run a single worker process, setting it to auto -# will create a worker for each CPU core -ENV NGINX_WORKER_PROCESSES 1 - -# By default, Nginx listens on port 80. -# To modify this, change LISTEN_PORT environment variable. -# (in a Dockerfile or with an option for `docker run`) -ENV LISTEN_PORT 80 - -# Copy start.sh script that will check for a /app/prestart.sh script and run it before starting the app -COPY start.sh /start.sh -RUN chmod +x /start.sh - -# Copy the entrypoint that will generate Nginx additional configs -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] - -# Add demo app -COPY ./app /app -WORKDIR /app - -# Run the start script, 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"] diff --git a/scripts/process_all.py b/scripts/process_all.py index 15d9a16..7acde53 100644 --- a/scripts/process_all.py +++ b/scripts/process_all.py @@ -8,8 +8,6 @@ {"NAME": "python3.11", "PYTHON_VERSION": "3.11"}, {"NAME": "python3.10", "PYTHON_VERSION": "3.10"}, {"NAME": "python3.9", "PYTHON_VERSION": "3.9"}, - {"NAME": "python3.8", "PYTHON_VERSION": "3.8"}, - {"NAME": "python3.7", "PYTHON_VERSION": "3.7"}, ] start_with = os.environ.get("START_WITH") From f27fccf962e9f6fba60fae530eae45b875d453e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 2 Nov 2024 14:56:10 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index deaa771..3d53eef 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,28 @@ * [`python3.11`, _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/docker-images/python3.11.dockerfile) * [`python3.10`, _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/docker-images/python3.10.dockerfile) * [`python3.9`, _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/docker-images/python3.9.dockerfile) -* [`python3.8` _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/docker-images/python3.8.dockerfile) -* [`python3.7`, _(Dockerfile)_](https://github.com/tiangolo/uwsgi-nginx-docker/blob/master/docker-images/python3.7.dockerfile) ## Deprecated tags 🚨 These tags are no longer supported or maintained, they are removed from the GitHub repository, but the last versions pushed might still be available in Docker Hub if anyone has been pulling them: +* `python3.8` * `python3.8-alpine` +* `python3.7` * `python3.6` * `python2.7` The last date tags for these versions are: +* `python3.8-2024-10-28` * `python3.8-alpine-2024-03-11` +* `python3.7-2024-10-28` * `python3.6-2022-11-25` * `python2.7-2022-11-25` --- -**Note**: There are [tags for each build date](https://hub.docker.com/r/tiangolo/uwsgi-nginx/tags). If you need to "pin" the Docker image version you use, you can select one of those tags. E.g. `tiangolo/uwsgi-nginx:python3.7-2019-09-28`. +**Note**: There are [tags for each build date](https://hub.docker.com/r/tiangolo/uwsgi-nginx/tags). If you need to "pin" the Docker image version you use, you can select one of those tags. E.g. `tiangolo/uwsgi-nginx:python3.12-2024-11-02`. # uwsgi-nginx