The easiest way to run a simple Wagtail CMS website in Docker or Kubernetes
1.9K
Build and deploy a simple Wagtail CMS website in minutes with Docker or Kubernetes. Simple and fast.
Leave a star ⭐ if you like this project 🙂 thank you.
A lightweight, ready-to-use Docker image for Wagtail CMS. Perfect for developers, bloggers, and anyone who wants to launch a Wagtail-powered website instantly—no manual setup required. Supports persistent storage, environment variable configuration, and easy backup. Ideal for quick prototyping, demos, and learning Wagtail.
This image provides a complete Wagtail CMS environment with all dependencies preinstalled.
Just pull and run—your Wagtail site is ready at http://localhost:8000.
/app/data to keep your database and media files ready for easy backup and migration.1. Pull the Image:
docker pull mrcolorrain/wagtail:latest
2. Run the Container:
Option 1) 🐳 Docker run:
docker run -d --name wagtail \
-p 8000:8000 \
-v $PWD/app/data:/app/data \
-e DJANGO_SECRET_KEY=your-secret-key \
-e DJANGO_SUPERUSER_USERNAME=admin \
-e [email protected] \
-e DJANGO_SUPERUSER_PASSWORD=yourpassword \
mrcolorrain/wagtail:latest
Option 2) 🐳 Docker compose:
version: "3.8"
services:
wagtail:
image: mrcolorrain/wagtail:latest
ports:
- "8000:8000"
volumes:
- ./app/data:/app/data
environment:
DJANGO_SECRET_KEY: your-secret
DJANGO_SUPERUSER_USERNAME: admin
DJANGO_SUPERUSER_EMAIL: [email protected]
DJANGO_SUPERUSER_PASSWORD: supersecret
app/data/ folder on your host.3. Kubernetes Deployment:
k8s/ folder:kubectl apply -f k8s/
▶️ Built-in Example Website
The image includes a ready-to-use Wagtail website example with homepage, blog, tags, and authors—just like a completed Wagtail quickstart.
The example project is always available inside the container at /app/examples/your-first-wagtail-site/, even if you mount a volume over /app/data.
To run the example directly (no need to copy anything), use:
docker run -d --name wagtail \
-v $PWD/app/data:/app/data \
-e DJANGO_SECRET_KEY=your-secret \
-e DJANGO_SUPERUSER_USERNAME=admin \
-e [email protected] \
-e DJANGO_SUPERUSER_PASSWORD=supersecret \
-e PROJECT_NAME=mysite \
-e DEST_DIR=/app/examples/your-first-wagtail-site \
-p 8000:8000 \
mrcolorrain/wagtail:latest
To start a new project based on the example, copy it out:
# From inside the running container:
cp -r /app/examples/your-first-wagtail-site /app/data/my-new-site
# Or from the repo:
cp -r app/examples/your-first-wagtail-site app/data/my-new-site
Then set DEST_DIR to your new path.
You can also run the example locally with Python for development:
cd app/examples/your-first-wagtail-site
pip install -r ../requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:8000
Change the project name or data directory using environment variables (PROJECT_NAME, DEST_DIR).
Use your own database and add your desired plugins by overriding settings or mounting a custom config.
Extend the image by creating your own Dockerfile based on mrcolorrain/wagtail.
If you find this project helpful, please leave a star ⭐ or contribute to the repository.
Your support is greatly appreciated!
Content type
Image
Digest
sha256:406d81d83…
Size
181 MB
Last updated
about 1 year ago
docker pull mrcolorrain/wagtail