Vendure
Headless e-commerce framework with GraphQL.
[i]Overview
Vendure is a modern, open-source headless e-commerce framework built with TypeScript and Node.js that provides GraphQL-first APIs for building custom commerce experiences. Launched in 2019, Vendure was designed to address the limitations of traditional monolithic e-commerce platforms by offering a developer-friendly, extensible architecture that separates the commerce engine from the presentation layer. This approach enables businesses to create unique shopping experiences across web, mobile, and emerging channels while maintaining full control over their commerce logic.
This Docker stack combines Vendure's powerful e-commerce engine with PostgreSQL's robust relational database capabilities to create a production-ready headless commerce platform. PostgreSQL's ACID compliance and advanced querying features make it ideal for handling complex e-commerce operations like inventory management, order processing, and customer data relationships. The combination leverages PostgreSQL's JSON support for flexible product attributes while maintaining referential integrity for critical business data like transactions and customer records.
This configuration is perfect for development teams building custom e-commerce solutions, agencies creating commerce platforms for clients, or businesses transitioning from legacy e-commerce systems to modern headless architectures. The stack provides both a complete admin interface for content management and dual GraphQL APIs for frontend integration, making it suitable for everything from rapid prototyping to enterprise-scale deployments.
[*]Key Features
- [+]Dual GraphQL APIs with separate shop and admin endpoints for secure role-based access
- [+]Built-in admin UI with comprehensive product, order, and customer management capabilities
- [+]Extensible plugin architecture supporting custom payment processors, shipping calculators, and business logic
- [+]Multi-channel support for managing different storefronts, currencies, and tax zones
- [+]Advanced product modeling with variants, facets, and collections for complex catalog structures
- [+]Real-time inventory tracking with stock allocation and backorder management
- [+]Flexible promotion engine supporting percentage, fixed amount, and tiered discount strategies
- [+]PostgreSQL integration with optimized queries for e-commerce operations and full-text product search
[#]Common Use Cases
- [1]Building custom storefronts with React, Vue, or Angular while leveraging a robust commerce backend
- [2]Creating multi-brand e-commerce platforms where each brand needs distinct catalogs and pricing
- [3]Developing B2B commerce solutions with custom pricing tiers and approval workflows
- [4]Migrating from Shopify Plus or Magento to a more flexible, developer-controlled platform
- [5]Building marketplace platforms that require complex vendor management and commission structures
- [6]Creating omnichannel retail experiences that sync inventory across web, mobile, and POS systems
- [7]Developing subscription commerce platforms with recurring billing and customer lifecycle management
[!]Prerequisites
- [!]Minimum 2GB RAM recommended for combined Vendure and PostgreSQL operations
- [!]Port 3000 available for Vendure GraphQL APIs and admin interface access
- [!]Basic understanding of GraphQL queries and mutations for API integration
- [!]Node.js and TypeScript knowledge for customizing Vendure plugins and configuration
- [!]Familiarity with PostgreSQL for database optimization and backup strategies
- [!]Understanding of headless commerce concepts and API-driven frontend development
[!]
WARNING: 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 vendure: 3 image: vendure/vendure:latest4 container_name: vendure5 restart: unless-stopped6 environment: 7 DB_HOST: postgres8 DB_PORT: 54329 DB_NAME: ${DB_NAME}10 DB_USERNAME: ${DB_USER}11 DB_PASSWORD: ${DB_PASSWORD}12 ports: 13 - "3000:3000"14 depends_on: 15 - postgres16 networks: 17 - vendure1819 postgres: 20 image: postgres:16-alpine21 container_name: vendure-postgres22 environment: 23 POSTGRES_DB: ${DB_NAME}24 POSTGRES_USER: ${DB_USER}25 POSTGRES_PASSWORD: ${DB_PASSWORD}26 volumes: 27 - postgres_data:/var/lib/postgresql/data28 networks: 29 - vendure3031volumes: 32 postgres_data: 3334networks: 35 vendure: 36 driver: bridge[$].env Template
[.env]
1DB_NAME=vendure2DB_USER=vendure3DB_PASSWORD=changeme[i]Usage Notes
- [1]Docs: https://docs.vendure.io/
- [2]Admin UI at http://localhost:3000/admin (superadmin/superadmin)
- [3]Shop GraphQL API at http://localhost:3000/shop-api
- [4]Admin GraphQL API at http://localhost:3000/admin-api
- [5]TypeScript + Node.js, highly extensible plugin architecture
- [6]Built for headless commerce with any frontend framework
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
vendure
vendure:
image: vendure/vendure:latest
container_name: vendure
restart: unless-stopped
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${DB_NAME}
DB_USERNAME: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
ports:
- "3000:3000"
depends_on:
- postgres
networks:
- vendure
postgres
postgres:
image: postgres:16-alpine
container_name: vendure-postgres
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- vendure
[>]Quick Start
[terminal]
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 vendure:5 image: vendure/vendure:latest6 container_name: vendure7 restart: unless-stopped8 environment:9 DB_HOST: postgres10 DB_PORT: 543211 DB_NAME: ${DB_NAME}12 DB_USERNAME: ${DB_USER}13 DB_PASSWORD: ${DB_PASSWORD}14 ports:15 - "3000:3000"16 depends_on:17 - postgres18 networks:19 - vendure2021 postgres:22 image: postgres:16-alpine23 container_name: vendure-postgres24 environment:25 POSTGRES_DB: ${DB_NAME}26 POSTGRES_USER: ${DB_USER}27 POSTGRES_PASSWORD: ${DB_PASSWORD}28 volumes:29 - postgres_data:/var/lib/postgresql/data30 networks:31 - vendure3233volumes:34 postgres_data:3536networks:37 vendure:38 driver: bridge39EOF4041# 2. Create the .env file42cat > .env << 'EOF'43DB_NAME=vendure44DB_USER=vendure45DB_PASSWORD=changeme46EOF4748# 3. Start the services49docker compose up -d5051# 4. View logs52docker compose logs -f[>]One-Liner
Run this command to download and set up the recipe in one step:
[terminal]
1curl -fsSL https://docker.recipes/api/recipes/vendure/run | bash[?]Troubleshooting
- [!]Database connection failed: Verify PostgreSQL container is running and DB_HOST matches the postgres service name in the network
- [!]Admin UI shows 'Cannot connect to server': Check that Vendure container started successfully after PostgreSQL and database migrations completed
- [!]GraphQL queries return authentication errors: Ensure you're using the correct API endpoint (shop-api vs admin-api) and proper authorization headers
- [!]Product images not displaying: Configure asset storage settings in Vendure config and ensure proper file upload permissions
- [!]Performance issues with large catalogs: Optimize PostgreSQL memory settings and consider adding database indexes for custom product queries
- [!]Plugin installation failures: Verify TypeScript compilation succeeds and all plugin dependencies are included in the container build
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
Shortcuts: C CopyF FavoriteD Download