You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -14,7 +44,6 @@ Every tag in this repository supports these architectures:
14
44
15
45
* linux/amd64
16
46
* linux/arm64
17
-
* linux/arm/v7
18
47
19
48
20
49
### Small Images via Multi Stage Builds
@@ -27,63 +56,142 @@ This project uses the Github Container Registry to store images, which have no r
27
56
28
57
### Rapid Building of New Versions
29
58
30
-
Within 30 minutes of a new release to TEMPLATE_PYTHON_PACKAGE on PyPI builds will kick off for new containers. This means new versions can be used in hours, not days.
59
+
Within 30 minutes of a new release to quasiqueue on PyPI builds will kick off for new containers. This means new versions can be used in hours, not days.
31
60
32
61
### Regular Updates
33
62
34
63
Containers are rebuilt weekly in order to take on the security patches from upstream containers.
35
64
36
65
## How To
37
66
38
-
### Full
67
+
### Using the Full Image
68
+
The Full Images use the base Python Docker images as their parent. These images are based off of Ubuntu and contain a variety of build tools.
FROM ghcr.io/multi-py/multipy-image-template:py3.10-LATEST
79
+
FROM ghcr.io/multi-py/python-quasiqueue:py3.12-LATEST
50
80
```
51
81
52
-
### Slim
82
+
### Using the Slim Image
83
+
84
+
The Slim Images use the base Python Slim Docker images as their parent. These images are very similar to the Full images, but without the build tools. These images are much smaller than their counter parts but are more difficult to compile wheels on.
FROM ghcr.io/multi-py/multipy-image-template:py3.10-slim-LATEST
95
+
FROM ghcr.io/multi-py/python-quasiqueue:py3.12-slim-LATEST
64
96
```
65
97
66
-
### Copy Just the Packages
67
98
99
+
100
+
### Using the Alpine Image
101
+
102
+
The Alpine Images use the base Python Alpine Docker images as their parent. These images use Alpine as their operating system, with musl instead of glibc.
103
+
104
+
In theory these images are smaller than even the slim images, but this amounts to less than 30mb difference. Additional Python libraries tend not to be super well tested on Alpine. These images should be used with care and testing until this ecosystem matures.
FROM ghcr.io/multi-py/python-quasiqueue:py3.12-alpine-LATEST
117
+
```
118
+
119
+
120
+
121
+
122
+
### Copy Just the Packages
68
123
It's also possible to copy just the Python packages themselves. This is particularly useful when you want to use the precompiled libraries from multiple containers.
By default the startup script checks for the following packages and uses the first one it can find-
134
+
135
+
*`/app/app/main.py`
136
+
*`/app/main.py`
76
137
138
+
If you are using pip to install dependencies your dockerfile could look like this-
139
+
140
+
```dockerfile
141
+
FROM ghcr.io/multi-py/python-quasiqueue:py3.12-0.4.2
142
+
143
+
COPY requirements /requirements
144
+
RUN pip install --no-cache-dir -r /requirements
145
+
COPY ./app app
146
+
```
147
+
148
+
### PreStart Script
149
+
150
+
When the container is launched it will run the script at `/app/prestart.sh` before starting the uvicorn service. This is an ideal place to put things like database migrations.
151
+
152
+
153
+
## Environmental Variables
154
+
155
+
### `PORT`
156
+
157
+
The port that the application inside of the container will listen on. This is different from the host port that gets mapped to the container.
158
+
159
+
160
+
### `LOG_LEVEL`
161
+
162
+
The uvicorn log level. Must be one of the following:
163
+
164
+
*`critical`
165
+
*`error`
166
+
*`warning`
167
+
*`info`
168
+
*`debug`
169
+
*`trace`
170
+
171
+
172
+
### `MODULE_NAME`
173
+
174
+
The python module that the container will start. This should be a script that starts QuasiQueue.
175
+
176
+
177
+
### `PRE_START_PATH`
178
+
179
+
Where to find the prestart script.
180
+
181
+
182
+
### `RELOAD`
183
+
184
+
When this is set to the string `true` uvicorn is launched in reload mode. If any files change uvicorn will reload the modules again, allowing for quick debugging. This comes at a performance cost, however, and should not be enabled on production machines.
77
185
78
186
## Python Versions
79
187
80
188
This project actively supports these Python versions:
81
189
190
+
* 3.12
191
+
* 3.11
82
192
* 3.10
83
193
* 3.9
84
194
* 3.8
85
-
* 3.7
86
-
* 3.6
87
195
88
196
89
197
## Image Variants
@@ -115,7 +223,6 @@ Every tag in this repository supports these architectures:
115
223
116
224
* linux/amd64
117
225
* linux/arm64
118
-
* linux/arm/v7
119
226
120
227
121
228
## Sponsorship
@@ -128,33 +235,46 @@ If you get use out of these containers please consider sponsoring me using Githu
Older tags are left for historic purposes but do not receive updates. A full list of tags can be found on the package's [registry page](https://github.com/multi-py/multipy-image-template/pkgs/container/multipy-image-template).
159
-
279
+
Older tags are left for historic purposes but do not receive updates. A full list of tags can be found on the package's [registry page](https://github.com/multi-py/python-quasiqueue/pkgs/container/python-quasiqueue).
0 commit comments