Skip to content

Commit

Permalink
docs: add Python versions to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Midnighter committed Aug 30, 2023
1 parent b8c04fa commit 8834314
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

A base [Docker](https://www.docker.com/) image for microservices using
[FastAPI](https://fastapi.tiangolo.com/). The Docker image environment is based
on
[Debian](https://www.debian.org/) and provides a Python environment with
on [Debian](https://www.debian.org/) and provides a Python environment with
FastAPI, [gunicorn](https://gunicorn.org/), and [uvicorn
workers](https://www.uvicorn.org/) acting as an [Asynchronous Server Gateway
Interface (ASGI)](https://asgi.readthedocs.io/en/latest/).
Expand All @@ -17,24 +16,21 @@ Interface (ASGI)](https://asgi.readthedocs.io/en/latest/).
What is special about this Docker image? There are two key elements:

1. The image is completely deterministic in the sense that all Python
dependencies are pinned exactly using the `pip-compile` command from the
[pip-tools](https://pypi.org/project/pip-tools/) including package hashes so
that you can recreate the image exactly.
dependencies are pinned exactly using the `pip-compile` command from the
[pip-tools](https://pypi.org/project/pip-tools/) including package hashes so
that you can recreate the image exactly.
2. Every week, a [cron job](.github/workflows/cron-upgrade.yml) re-compiles the
dependencies and if they changed, commits them.
dependencies and if they changed, commits them.
3. When the dependencies change, the image is
[re-built](.github/workflows/docker-image-ci.yml) and tagged with the
information shown below, with the date of creation, and the short
version of the commit hash, for example,
```
midnighter/fastapi-base:3.8-slim-buster_2020-07-03_d517373
```
That means, if you use these tags, you know _exactly_ what you are getting.
information shown below, with the date of creation, and the short version of
the commit hash, for example, `midnighter/fastapi-base:3.8-slim-buster_2020-07-03_d517373` That means, if
you use these tags, you know _exactly_ what you are getting.

## Usage

You can combine this deterministic base image with your own in the following
ways. A tool like tag-spy can be used to retrieve the latest tag for each image
ways. A tool like tag-spy can be used to retrieve the latest tag for each image
when you build your own.

```
Expand Down Expand Up @@ -67,11 +63,14 @@ Images are generated for the following environments. Please [open an
issue](https://github.com/Midnighter/fastapi-base/issues/new) if you require
others.

| Tag | Python | Distribution |
| --- | ------ | ------------ |
| 3.8-slim-buster | 3.8 | [Debian Buster](https://www.debian.org/) |
| Tag | Python | Distribution |
| ------------------ | ------ | ------------------------------------------ |
| 3.8-slim-bookworm | 3.8 | [Debian Bookworm](https://www.debian.org/) |
| 3.9-slim-bookworm | 3.9 | [Debian Bookworm](https://www.debian.org/) |
| 3.10-slim-bookworm | 3.10 | [Debian Bookworm](https://www.debian.org/) |
| 3.11-slim-bookworm | 3.11 | [Debian Bookworm](https://www.debian.org/) |

## Copyright

* Copyright © 2019-23, Moritz E. Beber.
* Free software licensed under the [Apache License, Version 2.0](LICENSE).
- Copyright © 2019-23, Moritz E. Beber.
- Free software licensed under the [Apache License, Version 2.0](LICENSE).

0 comments on commit 8834314

Please sign in to comment.