Saleor
GraphQL-first e-commerce platform.
Overview
Saleor is a modern, headless e-commerce platform built with Python and Django that prioritizes GraphQL APIs over traditional REST endpoints. Created by Mirumee Software in 2012, Saleor has evolved into a powerful enterprise-grade solution that separates the backend commerce engine from frontend presentation layers, enabling businesses to build custom shopping experiences across web, mobile, and emerging channels. The platform emphasizes developer experience with comprehensive GraphQL APIs, extensive webhook systems, and a plugin architecture that supports complex business requirements. This stack combines Saleor's commerce engine with PostgreSQL for robust transactional data management and Redis for high-performance caching and session storage. PostgreSQL provides the ACID compliance essential for financial transactions, inventory management, and customer data integrity, while Redis accelerates API responses through intelligent caching of product catalogs, user sessions, and frequently accessed data. The combination creates a scalable foundation capable of handling everything from startup marketplaces to enterprise multi-channel operations. Organizations choosing this stack gain access to advanced commerce features like multi-tenant architecture, international selling capabilities with localized currencies and tax calculations, sophisticated inventory management across multiple warehouses, and extensible checkout flows. The GraphQL-first approach enables frontend teams to work independently while maintaining type safety and efficient data fetching, making this particularly valuable for businesses requiring custom user experiences or integration with existing systems.
Key Features
- GraphQL Playground interface at /graphql/ for API exploration and testing with full schema introspection
- Multi-channel commerce supporting separate storefronts, pricing, and inventory per sales channel
- Advanced inventory management with multi-warehouse support and stock allocation strategies
- International commerce features including multi-currency pricing, tax calculation, and localized shipping
- Webhook system for real-time event notifications to external systems and custom integrations
- Plugin architecture supporting custom business logic, payment gateways, and third-party integrations
- PostgreSQL JSONB fields for flexible product attributes and metadata without schema migrations
- Redis-powered caching for product catalogs, user sessions, and API response optimization
Common Use Cases
- 1Headless e-commerce for brands wanting custom frontend experiences across web, mobile, and IoT devices
- 2B2B marketplaces requiring complex pricing structures, customer-specific catalogs, and approval workflows
- 3Multi-brand retailers managing separate storefronts with shared inventory and unified administration
- 4International commerce operations needing localized pricing, tax calculation, and regional shipping options
- 5Subscription commerce businesses requiring recurring billing, customer portals, and flexible product variants
- 6Enterprise migrations from legacy platforms needing API-first architecture for system integrations
- 7Marketplace platforms where multiple vendors sell through a unified commerce engine
Prerequisites
- Minimum 2GB RAM recommended for Saleor application server with moderate product catalogs
- Additional 1GB+ RAM for PostgreSQL to handle transactional workloads and complex queries efficiently
- Port 8000 available for Saleor GraphQL API and administrative interface access
- Understanding of GraphQL query syntax for API integration and frontend development
- Familiarity with environment variable management for database credentials and application secrets
- Basic knowledge of PostgreSQL administration for backup strategies and performance tuning
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 saleor: 3 image: ghcr.io/saleor/saleor:latest4 container_name: saleor5 restart: unless-stopped6 environment: 7 DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}8 REDIS_URL: redis://redis:63799 SECRET_KEY: ${SECRET_KEY}10 ports: 11 - "8000:8000"12 depends_on: 13 - postgres14 - redis15 networks: 16 - saleor1718 postgres: 19 image: postgres:16-alpine20 container_name: saleor-postgres21 environment: 22 POSTGRES_DB: ${DB_NAME}23 POSTGRES_USER: ${DB_USER}24 POSTGRES_PASSWORD: ${DB_PASSWORD}25 volumes: 26 - postgres_data:/var/lib/postgresql/data27 networks: 28 - saleor2930 redis: 31 image: redis:alpine32 container_name: saleor-redis33 networks: 34 - saleor3536volumes: 37 postgres_data: 3839networks: 40 saleor: 41 driver: bridge.env Template
.env
1DB_NAME=saleor2DB_USER=saleor3DB_PASSWORD=changeme4SECRET_KEY=your-secret-keyUsage Notes
- 1Docs: https://docs.saleor.io/
- 2GraphQL API at http://localhost:8000/graphql/ with Playground
- 3Dashboard: deploy saleor-dashboard separately at port 9000
- 4Storefront: use saleor-storefront or react-storefront templates
- 5Multi-channel, multi-warehouse, multi-currency support
- 6Webhooks and apps ecosystem for extensibility
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
saleor
saleor:
image: ghcr.io/saleor/saleor:latest
container_name: saleor
restart: unless-stopped
environment:
DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}
REDIS_URL: redis://redis:6379
SECRET_KEY: ${SECRET_KEY}
ports:
- "8000:8000"
depends_on:
- postgres
- redis
networks:
- saleor
postgres
postgres:
image: postgres:16-alpine
container_name: saleor-postgres
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- saleor
redis
redis:
image: redis:alpine
container_name: saleor-redis
networks:
- saleor
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 saleor:5 image: ghcr.io/saleor/saleor:latest6 container_name: saleor7 restart: unless-stopped8 environment:9 DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}10 REDIS_URL: redis://redis:637911 SECRET_KEY: ${SECRET_KEY}12 ports:13 - "8000:8000"14 depends_on:15 - postgres16 - redis17 networks:18 - saleor1920 postgres:21 image: postgres:16-alpine22 container_name: saleor-postgres23 environment:24 POSTGRES_DB: ${DB_NAME}25 POSTGRES_USER: ${DB_USER}26 POSTGRES_PASSWORD: ${DB_PASSWORD}27 volumes:28 - postgres_data:/var/lib/postgresql/data29 networks:30 - saleor3132 redis:33 image: redis:alpine34 container_name: saleor-redis35 networks:36 - saleor3738volumes:39 postgres_data:4041networks:42 saleor:43 driver: bridge44EOF4546# 2. Create the .env file47cat > .env << 'EOF'48DB_NAME=saleor49DB_USER=saleor50DB_PASSWORD=changeme51SECRET_KEY=your-secret-key52EOF5354# 3. Start the services55docker compose up -d5657# 4. View logs58docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/saleor/run | bashTroubleshooting
- Saleor container exits with database connection errors: Verify DATABASE_URL format and ensure PostgreSQL container is healthy before Saleor starts
- GraphQL queries timeout or return slowly: Check Redis container status and verify REDIS_URL connectivity for caching functionality
- Product images not displaying properly: Configure media storage settings and ensure proper volume mounts or cloud storage integration
- Migration errors during startup: Clear PostgreSQL data volume and restart stack to rebuild database schema from scratch
- SECRET_KEY warnings in logs: Generate cryptographically secure secret key and set in environment variables for session security
- Memory exhaustion with large catalogs: Increase container memory limits and optimize PostgreSQL shared_buffers configuration
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download