---
title: Deploy SaaS Pegasus with AI on Blossom
url: "/deploy/saas-pegasus/"
canonical_url: https://blossom88.com/deploy/saas-pegasus/
markdown_url: https://blossom88.com/deploy/saas-pegasus.md
summary: Ship Cory Zue's free Django starter with production Vite assets, managed
  PostgreSQL, and a Celery worker backed by Redis.
categories:
- deployment
- django
- starter
stack:
- Python
- Django
- Vite
- Celery
- PostgreSQL
- Redis
---

# Deploy SaaS Pegasus with AI on Blossom

[Cory Zue’s SaaS Pegasus](https://www.saaspegasus.com/) gives you a Django
starting point with sign-up, a Vite front end, and Celery background jobs.
This recipe uses the free, [MIT-licensed open-source edition](https://github.com/saaspegasus/django-boilerplate).

![A signed-in demo profile in the SaaS Pegasus Django starter.](/deploy/assets/images/saas-pegasus/demo-profile.webp)

## Ask Your Agent

> **Ask your AI agent:** Deploy the open-source SaaS Pegasus starter on Blossom and help me sign up and run a background job.
>
> Follow this guide: https://blossom88.com/deploy/saas-pegasus/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Sign Up and Run a Background Job

Create a demo account and save its profile. Queue the starter’s expired
session cleanup task and verify that the Celery worker processes it.

<details class="optional-reading" markdown="1">
<summary>Recreate the tested demo</summary>

Build the [demo recipe](/deploy/recipes/saas-pegasus/README.md) as a
Dockerfile Project. It pins the [tested starter revision](https://github.com/saaspegasus/django-boilerplate/tree/75a1441d1e1ef7028cb92b2da544fbfcd86d8b6f)
and compiles the Vite assets during the build. Put the four recipe files in
the same Git repository directory and use it as the Dockerfile build context.

[Dockerfile](/deploy/recipes/saas-pegasus/Dockerfile) · [Django settings](/deploy/recipes/saas-pegasus/blossom_settings.py) · [Health URL](/deploy/recipes/saas-pegasus/blossom_urls.py) · [Celery check](/deploy/recipes/saas-pegasus/verify_demo.py)

Link [Blossom Managed PostgreSQL and Redis](https://docs.blossom88.com/docs/data/) as
`DATABASE_URL` and `REDIS_URL`. The demo used shared PostgreSQL 18 and Redis
8, both small with 10 GiB storage. Keep the Environment behind Blossom Account
access and store a stable private Django `SECRET_KEY`.

Use `python manage.py migrate --noinput` as the Release Phase command.
Run one small web Container with the default Gunicorn command on port 8000
and a command check for `/healthz` using Python. Run one small private worker
Container with `celery -A project worker --loglevel=INFO --concurrency=1`.
Both run on regular App Capacity. For a demo without outbound mail, set
`EMAIL_BACKEND=django.core.mail.backends.locmem.EmailBackend`.

```yaml
health_check:
  enabled: true
  kind: command
  command:
    - python
    - -c
    - 'from urllib.request import urlopen; assert urlopen("http://127.0.0.1:8000/healthz", timeout=4).read() == b"ok"'
```

Open `/accounts/signup/` to create the demo account and save a profile. Run
`python verify_demo.py` as an ad hoc Job to verify migrations and Celery.

    blossom profile:show
    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom git_repo:create --data git-repo.yml
    blossom environment:build_config:update --id environment-100 --data build.yml
    blossom environment:deploy_hooks:update --id environment-100 --data migrations.yml
    blossom database_instance:create --data postgres.yml
    blossom cache_instance:create --data redis.yml
    blossom environment_link:create --data postgres-link.yml
    blossom environment_link:create --data redis-link.yml
    blossom service:create --data web.yml
    blossom service:create --data worker.yml
    blossom env_var:push --environment environment-100 --file .env.runtime
    blossom environment:deploy --id environment-100 --follow
    blossom job:run:create --environment environment-100 --command "python verify_demo.py" --follow

</details>

## What You Get

- A Django starter with working sign-up and compiled front-end assets
- A Celery worker backed by Redis and account data stored in PostgreSQL
