diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4bdb067..a446e13 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,18 +21,12 @@ 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" - name: python3.11-slim python_version: "3.11" - name: python3.10-slim python_version: "3.10" - name: python3.9-slim python_version: "3.9" - - name: python3.8-slim - python_version: "3.8" fail-fast: true runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24f182e..667c7a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,18 +25,12 @@ 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" - name: python3.11-slim python_version: "3.11" - name: python3.10-slim python_version: "3.10" - name: python3.9-slim python_version: "3.9" - - name: python3.8-slim - python_version: "3.8" fail-fast: true runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 9908c83..a7665e0 100644 --- a/README.md +++ b/README.md @@ -13,19 +13,19 @@ Read more about it below. * [`python3.11`, `latest` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.11.dockerfile) * [`python3.10`, _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.10.dockerfile) * [`python3.9`, _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.9.dockerfile) -* [`python3.8`, _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.8.dockerfile) -* [`python3.7`, _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.7.dockerfile) * [`python3.11-slim` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.11-slim.dockerfile) * [`python3.10-slim` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.10-slim.dockerfile) * [`python3.9-slim` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.9-slim.dockerfile) -* [`python3.8-slim` _(Dockerfile)_](https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/python3.8-slim.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.9-alpine3.14` +* `python3.8` +* `python3.8-slim` * `python3.8-alpine3.10` +* `python3.7` * `python3.7-alpine3.8` * `python3.6` * `python3.6-alpine3.8` @@ -33,14 +33,17 @@ Read more about it below. The last date tags for these versions are: * `python3.9-alpine3.14-2024-03-11` +* `python3.8-2024-11-02` +* `python3.8-slim-2024-11-02` * `python3.8-alpine3.10-2024-03-11` +* `python3.7-2024-11-02` * `python3.7-alpine3.8-2024-03-11` * `python3.6-2022-11-25` * `python3.6-alpine3.8-2022-11-25` --- -**Note**: There are [tags for each build date](https://hub.docker.com/r/tiangolo/uvicorn-gunicorn/tags). If you need to "pin" the Docker image version you use, you can select one of those tags. E.g. `tiangolo/uvicorn-gunicorn:python3.7-2019-10-15`. +**Note**: There are [tags for each build date](https://hub.docker.com/r/tiangolo/uvicorn-gunicorn/tags). If you need to "pin" the Docker image version you use, you can select one of those tags. E.g. `tiangolo/uvicorn-gunicorn:python3.11-2024-11-02`. # uvicorn-gunicorn diff --git a/docker-images/python3.7.dockerfile b/docker-images/python3.7.dockerfile deleted file mode 100644 index 8f2166b..0000000 --- a/docker-images/python3.7.dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM python:3.7 - -ENV PYTHONDONTWRITEBYTECODE=1 -ENV PYTHONUNBUFFERED=1 - -LABEL maintainer="Sebastian Ramirez " - -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -COPY ./start.sh /start.sh -RUN chmod +x /start.sh - -COPY ./gunicorn_conf.py /gunicorn_conf.py - -COPY ./start-reload.sh /start-reload.sh -RUN chmod +x /start-reload.sh - -COPY ./app /app -WORKDIR /app/ - -ENV PYTHONPATH=/app - -# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations) -# And then will start Gunicorn with Uvicorn -CMD ["/start.sh"] diff --git a/docker-images/python3.8-slim.dockerfile b/docker-images/python3.8-slim.dockerfile deleted file mode 100644 index ede558f..0000000 --- a/docker-images/python3.8-slim.dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM python:3.8-slim - -ENV PYTHONDONTWRITEBYTECODE=1 -ENV PYTHONUNBUFFERED=1 - -LABEL maintainer="Sebastian Ramirez " - -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -COPY ./start.sh /start.sh -RUN chmod +x /start.sh - -COPY ./gunicorn_conf.py /gunicorn_conf.py - -COPY ./start-reload.sh /start-reload.sh -RUN chmod +x /start-reload.sh - -COPY ./app /app -WORKDIR /app/ - -ENV PYTHONPATH=/app - -# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations) -# And then will start Gunicorn with Uvicorn -CMD ["/start.sh"] diff --git a/docker-images/python3.8.dockerfile b/docker-images/python3.8.dockerfile deleted file mode 100644 index 0f6375a..0000000 --- a/docker-images/python3.8.dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM python:3.8 - -ENV PYTHONDONTWRITEBYTECODE=1 -ENV PYTHONUNBUFFERED=1 - -LABEL maintainer="Sebastian Ramirez " - -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -COPY ./start.sh /start.sh -RUN chmod +x /start.sh - -COPY ./gunicorn_conf.py /gunicorn_conf.py - -COPY ./start-reload.sh /start-reload.sh -RUN chmod +x /start-reload.sh - -COPY ./app /app -WORKDIR /app/ - -ENV PYTHONPATH=/app - -# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations) -# And then will start Gunicorn with Uvicorn -CMD ["/start.sh"] diff --git a/scripts/process_all.py b/scripts/process_all.py deleted file mode 100644 index 6537e5b..0000000 --- a/scripts/process_all.py +++ /dev/null @@ -1,58 +0,0 @@ -import os -import subprocess -import sys - -environments = [ - {"NAME": "latest", "PYTHON_VERSION": "3.11"}, - {"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"}, - {"NAME": "python3.11-slim", "PYTHON_VERSION": "3.11"}, - {"NAME": "python3.10-slim", "PYTHON_VERSION": "3.10"}, - {"NAME": "python3.9-slim", "PYTHON_VERSION": "3.9"}, - {"NAME": "python3.8-slim", "PYTHON_VERSION": "3.8"}, -] - -start_with = os.environ.get("START_WITH") -build_push = os.environ.get("BUILD_PUSH") - - -def process_tag(*, env: dict): - use_env = {**os.environ, **env} - script = "scripts/test.sh" - if build_push: - script = "scripts/build-push.sh" - return_code = subprocess.call(["bash", script], env=use_env) - if return_code != 0: - sys.exit(return_code) - - -def print_version_envs(): - env_lines = [] - for env in environments: - env_vars = [] - for key, value in env.items(): - env_vars.append(f"{key}='{value}'") - env_lines.append(" ".join(env_vars)) - for line in env_lines: - print(line) - - -def main(): - start_at = 0 - if start_with: - start_at = [ - i for i, env in enumerate((environments)) if env["NAME"] == start_with - ][0] - for i, env in enumerate(environments[start_at:]): - print(f"Processing tag: {env['NAME']}") - process_tag(env=env) - - -if __name__ == "__main__": - if len(sys.argv) > 1: - print_version_envs() - else: - main()