Sign inSign up

mrcolorrain/wagtail

By mrcolorrain

Updated about 1 year ago

The easiest way to run a simple Wagtail CMS website in Docker or Kubernetes

Image
Web servers
Content management system
Databases & storage
0

1.9K

mrcolorrain/wagtail repository overview

🪶 Wagtail CMS Docker Image — Starter Kit for Instant Web Projects

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.


Quick Overview 🚀

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.

  • Persistent Data: Store your site content and media outside the container using Docker volumes, bind mounts, or Kubernetes PVCs.
  • Automated Setup: The container auto-initializes your project, applies migrations, creates a superuser, and collects static files.
  • Flexible Deployment: Use standalone with Docker, or deploy to Kubernetes with included manifests.
  • Multi-Architecture: Runs on both amd64 and arm64 platforms.

✨ Key Features

  • Instant Wagtail Website: Start a new Wagtail CMS site in seconds.
  • Persistent Storage: Easily map /app/data to keep your database and media files ready for easy backup and migration.
  • Environment Variable Setup: Configure admin credentials and project name via environment variables.
  • Customizable: Easily override project name, data directory, and admin credentials.
  • Automated Admin Creation: Superuser is created automatically on first run with your provided credentials.
  • Docker & Kubernetes Ready: Use as a standalone Docker image or with Kubernetes manifests.
  • Multi-Architecture: Runs on both amd64 and arm64 platforms.

Getting Started 🚥

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

3. Kubernetes Deployment:

  • Take the manifests examples that you can find on the GitHub repository
  • Edit and apply the manifests in the k8s/ folder:
kubectl apply -f k8s/

Example Project & Customization 🛠️

▶️ 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.


Need Help or Found an Issue? ❓

  • For discussions and feature requests, use the Discussion tab.
  • For issues and bug reporting, use the Issue tab.

Support the Project 🫶

If you find this project helpful, please leave a star ⭐ or contribute to the repository.
Your support is greatly appreciated!

Tag summary

Content type

Image

Digest

sha256:406d81d83

Size

181 MB

Last updated

about 1 year ago

docker pull mrcolorrain/wagtail