build-wagtail
An opinionated tool for quickly deploying a Wagtail project by turning it into a local Docker contaier. Run it in a Wagtail CMS directory and it generates a Docker image and a compose file in place ready for production run. It sets up the high-performance granian Python server instead of uwsgi and optionally also configures Caddy.
Needs Docker with the compose plugin to be installed on the host.
Install
uv tool install build-wagtail # or pipx install build-wagtail
Usage
cd to the Wagtail project dir (where manage.py is) and:
build-wagtail example.org,www.example.org
# That generates the Docker file and a compose.yml file,
# and runs Docker build locally to prepare the image.
# Then, to serve the site.
docker compose up -d
docker compose exec web python manage.py createsuperuser
The first hostname is canonical. The site runs on 127.0.0.1:8000. granian serves the app as well as /static and /media With --caddy, a Caddy container in front serves everything including TLS.
| Option | Default | |
|---|---|---|
--port |
8000 |
localhost port the site is served on |
--caddy |
off | Run Caddy in a container |
--caddy-image |
caddy:2.10-alpine |
Caddy image to use with --caddy |
--workers |
3 |
Number of granian server workers |
--threads |
4 |
granian threads per worker that run the app |
--python |
.python-version, else 3.13 |
Python version of the image |
--settings |
from manage.py, or <project>.settings.production |
Settings module to use |
--no-build |
off | Write the files but skip docker compose build |
How it works
The tool simply generates opinionated configuration files and optionally runs docker build to create the image locally.
The image only has Python, the project's dependencies and granian. The project directory itself is mounted into the container, so the site runs from the files in the directory. After changing code, run docker compose restart web. After changing dependencies, re-run build-wagtail.
The tool generates:
.env: secret key, hostnames and the container user, which is the project directory's owner. If it already exists, it's not overwritten..wagtail-docker/andcompose.yml(regenerated on every run).
Metadata
Release files for build-wagtail 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| build_wagtail-0.2.0.tar.gz | 6.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| build_wagtail-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.0 kB
Release files / build_wagtail-0.2.0.tar.gz
| Download URL | build_wagtail-0.2.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd0fa51962081b14c925bdff5ff3bdd99e9d2c34b6804b2b7c18e8382668c99a
|
|
BLAKE2b-256 checksum How to use checksums |
b168ff504ab19b13b5b69961357901864bd0e6de210ebc1e0345a1909022a36c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / build_wagtail-0.2.0-py3-none-any.whl
| Download URL | build_wagtail-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
960d7fe6c184f55e911d99ee6583811d26dbd003c90620f8e2eae70d332c0209
|
|
BLAKE2b-256 checksum How to use checksums |
c310da445a921680e0025b9c4fb35a33b2efee250aca34190f3c30976dd93aa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for build-wagtail 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.