dist/cursor/saleor-commerce/skills/saleor-deploy/SKILL.md
Deploy Saleor to production — Docker setup, Saleor Cloud, environment variables, Celery workers, S3 media storage, database management, and scaling. Use when deploying Saleor applications.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins saleor-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch live docs:
site:docs.saleor.io deployment production setup for production deployment guidehttps://github.com/saleor/saleor-platform for Docker Compose reference configurationsite:docs.saleor.io environment variables configuration for required environment variablessaleor Celery worker configuration production for Celery setup detailssite:docs.saleor.io cloud for Saleor Cloud managed hosting optionsSaleor provides an official Dockerfile with a multi-stage build:
| Stage | Purpose | Base Image |
|-------|---------|------------|
| build | Install dependencies, compile assets | python:3.12-slim |
| production | Run the application | python:3.12-slim |
| Service | Image | Purpose | Port |
|---------|-------|---------|------|
| api | saleor (custom build) | GraphQL API server (Gunicorn) | 8000 |
| worker | saleor (same image) | Celery worker process | N/A |
| db | postgres:15-alpine | PostgreSQL database | 5432 |
| redis | redis:7-alpine | Cache and Celery broker | 6379 |
| dashboard | saleor-dashboard | React admin UI | 9002 |
| storefront | Custom Next.js | Customer-facing storefront | 3000 |
| Feature | Description |
|---------|-------------|
| Managed API | Fully managed Saleor backend, no server maintenance |
| Auto-scaling | Scales based on traffic automatically |
| Managed database | PostgreSQL with backups and replication |
| CDN | Built-in CDN for media and static assets |
| Environments | Staging and production environments per project |
| CLI integration | Deploy and manage via saleor CLI |
Access via https://cloud.saleor.io/ — create projects, manage environments, and deploy Apps.
| Variable | Description | Example |
|----------|-------------|---------|
| DATABASE_URL | PostgreSQL connection string | postgres://user:pass@host:5432/saleor |
| SECRET_KEY | Django secret key (50+ chars) | Random string |
| ALLOWED_HOSTS | Comma-separated hostnames | api.example.com,localhost |
| DEFAULT_FROM_EMAIL | Sender email address | [email protected] |
| CELERY_BROKER_URL | Redis URL for Celery | redis://redis:6379/1 |
| Variable | Description | Default |
|----------|-------------|---------|
| DEBUG | Django debug mode | False |
| ALLOWED_CLIENT_HOSTS | Storefront origins for CORS | localhost |
| DEFAULT_CURRENCY | Fallback currency code | USD |
| DEFAULT_COUNTRY | Fallback country code | US |
| MAX_CHECKOUT_LINE_QUANTITY | Max qty per checkout line | 50 |
| JAEGER_AGENT_HOST | OpenTelemetry/Jaeger host | None |
| SENTRY_DSN | Sentry error tracking DSN | None |
Celery runs as a separate process using the same Saleor codebase:
| Setting | Value | Description |
|---------|-------|-------------|
| Broker | Redis | CELERY_BROKER_URL = redis://redis:6379/1 |
| Result backend | Redis | Optional, for task result storage |
| Concurrency | --concurrency=4 | Number of worker threads |
| Queues | celery (default) | Default task queue name |
| Beat | Optional | Periodic task scheduler |
| Task | Purpose | |------|---------| | Webhook delivery | Send async webhook payloads to Apps | | Email sending | Transactional emails (order confirmation, etc.) | | Thumbnail generation | Generate product image thumbnails | | Search indexing | Update search index entries | | Export processing | Handle CSV/XLSX data exports |
| Variable | Description | Example |
|----------|-------------|---------|
| AWS_MEDIA_BUCKET_NAME | S3 bucket name | saleor-media-prod |
| AWS_MEDIA_CUSTOM_DOMAIN | CDN domain for media | media.example.com |
| AWS_ACCESS_KEY_ID | IAM access key | IAM credential |
| AWS_SECRET_ACCESS_KEY | IAM secret key | IAM credential |
| AWS_S3_REGION_NAME | S3 region | us-east-1 |
| AWS_S3_ENDPOINT_URL | Custom S3 endpoint (for MinIO, GCS) | https://s3.example.com |
| Setting | Recommendation |
|---------|---------------|
| Version | PostgreSQL 14 or 15 |
| Connection pooling | Use PgBouncer in transaction mode |
| SSL | Require SSL connections (sslmode=require in DATABASE_URL) |
| Backups | Automated daily backups with point-in-time recovery |
| Extensions | pg_trgm (required for search), btree_gin |
| Max connections | Size for Gunicorn workers + Celery workers + buffer |
| Purpose | Database | Variable |
|---------|----------|----------|
| Cache | redis://redis:6379/0 | CACHE_URL |
| Celery broker | redis://redis:6379/1 | CELERY_BROKER_URL |
Run migrations during deployment before starting the new application version:
python manage.py migrate --noinput before starting Gunicorn/Celery with new codepython manage.py sqlmigrate <app> <migration>| Component | Strategy | Notes | |-----------|----------|-------| | API (Gunicorn) | Add replicas behind load balancer | Stateless, scale freely | | Celery workers | Add worker processes/containers | Scale based on queue depth | | Database | Read replicas for queries | Write goes to primary | | Redis | Redis Cluster or managed Redis | Separate cache from broker |
| Component | Tune |
|-----------|------|
| Gunicorn | --workers (2 * CPU + 1), --threads per worker |
| Celery | --concurrency based on task type (I/O vs CPU) |
| PostgreSQL | shared_buffers, work_mem, effective_cache_size |
| Tool | Purpose | Integration |
|------|---------|-------------|
| Sentry | Error tracking | SENTRY_DSN environment variable |
| OpenTelemetry | Distributed tracing | OTEL_EXPORTER_OTLP_ENDPOINT |
| Prometheus | Metrics collection | django-prometheus middleware |
| Health check | Liveness and readiness probes | /health/ endpoint |
| Item | Action |
|------|--------|
| DEBUG | Set to False |
| SECRET_KEY | Strong random value, stored in env var |
| ALLOWED_HOSTS | Restrict to actual domain names |
| Database | SSL enabled, connection pooling, backups configured |
| Media storage | S3-compatible with CDN |
| Celery | Running as separate process with monitoring |
| HTTPS | SSL termination at load balancer or reverse proxy |
| Migrations | Applied before deploying new code |
| Monitoring | Sentry, metrics, and health checks enabled |
Fetch the deployment documentation for current Docker setup, environment variables, and scaling recommendations before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.