Shopware
Open-source headless commerce platform.
Overview
Shopware is a modern, German-born e-commerce platform that has evolved from a traditional monolithic system into a powerful headless commerce solution. Built with PHP and Symfony, Shopware provides both traditional storefront capabilities and headless API-first architecture, making it particularly attractive for enterprise retailers who need flexibility in their frontend implementations. The platform emphasizes developer experience with its plugin system, comprehensive APIs, and modern architecture patterns. This Docker stack combines Shopware's production-ready container with MySQL 8.0 for transactional data storage and Elasticsearch 7.17 for advanced search capabilities. MySQL handles all product catalogs, customer data, orders, and configuration while Elasticsearch powers the sophisticated product search, filtering, and recommendation features that modern e-commerce demands. The integration between these components creates a robust foundation where Shopware automatically syncs product data to Elasticsearch for lightning-fast search responses while maintaining data consistency in MySQL. This configuration is ideal for businesses moving from platforms like Magento or WooCommerce who need enterprise-grade performance, developers building custom storefronts using Shopware's Store API, and organizations implementing omnichannel commerce strategies. The headless capabilities combined with Elasticsearch's analytics features make this stack particularly valuable for retailers requiring advanced personalization and search-driven shopping experiences.
Key Features
- Shopware Store API and Admin API for complete headless commerce implementation
- MySQL InnoDB storage with ACID compliance for reliable order and inventory management
- Elasticsearch full-text search with relevance scoring for advanced product discovery
- Shopware App System enabling custom plugins and third-party integrations
- Shopware Flow Builder for automated business processes and customer journeys
- Elasticsearch aggregations powering dynamic product filtering and faceted search
- MySQL JSON data type support for flexible product variant and custom field storage
- Shopware Shopping Experiences visual page builder for content management
Common Use Cases
- 1Mid-size retailers migrating from Magento seeking better developer experience and performance
- 2B2B companies needing complex pricing rules, customer groups, and procurement workflows
- 3Agencies building custom React or Vue.js storefronts using Shopware's headless APIs
- 4Multi-brand retailers requiring separate storefronts with shared inventory and customer data
- 5Fashion and electronics retailers needing advanced product search with filters and recommendations
- 6International businesses requiring multi-language, multi-currency, and multi-domain capabilities
- 7Marketplace operators building vendor management and commission tracking systems
Prerequisites
- Minimum 6GB RAM (2GB for Elasticsearch, 1GB for MySQL, 2GB for Shopware, plus system overhead)
- Docker Engine 20.10+ and Docker Compose v2 for proper container orchestration
- Available ports 8080 for Shopware storefront and admin panel access
- Basic understanding of PHP e-commerce platforms and Symfony framework concepts
- Knowledge of MySQL database administration for backup and performance tuning
- Familiarity with Elasticsearch concepts for search optimization and index management
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 shopware: 3 image: shopware/production:latest4 container_name: shopware5 restart: unless-stopped6 environment: 7 DATABASE_URL: mysql://${DB_USER}:${DB_PASSWORD}@mysql:3306/${DB_NAME}8 APP_URL: http://localhost:80809 ELASTICSEARCH_HOSTS: elasticsearch:920010 volumes: 11 - shopware_data:/var/www/html12 ports: 13 - "8080:80"14 depends_on: 15 - mysql16 - elasticsearch17 networks: 18 - shopware1920 mysql: 21 image: mysql:8.022 container_name: shopware-mysql23 environment: 24 MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}25 MYSQL_DATABASE: ${DB_NAME}26 MYSQL_USER: ${DB_USER}27 MYSQL_PASSWORD: ${DB_PASSWORD}28 volumes: 29 - mysql_data:/var/lib/mysql30 networks: 31 - shopware3233 elasticsearch: 34 image: elasticsearch:7.17.035 container_name: shopware-es36 environment: 37 - discovery.type=single-node38 volumes: 39 - es_data:/usr/share/elasticsearch/data40 networks: 41 - shopware4243volumes: 44 shopware_data: 45 mysql_data: 46 es_data: 4748networks: 49 shopware: 50 driver: bridge.env Template
.env
1DB_ROOT_PASSWORD=rootpassword2DB_NAME=shopware3DB_USER=shopware4DB_PASSWORD=changemeUsage Notes
- 1Docs: https://docs.shopware.com/
- 2Access storefront at http://localhost:8080, admin at /admin
- 3Default admin: admin / shopware (change immediately)
- 4Headless Store API and Admin API for integrations
- 5App system for plugins, flows for automation
- 6Enterprise features in commercial editions
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
shopware
shopware:
image: shopware/production:latest
container_name: shopware
restart: unless-stopped
environment:
DATABASE_URL: mysql://${DB_USER}:${DB_PASSWORD}@mysql:3306/${DB_NAME}
APP_URL: http://localhost:8080
ELASTICSEARCH_HOSTS: elasticsearch:9200
volumes:
- shopware_data:/var/www/html
ports:
- "8080:80"
depends_on:
- mysql
- elasticsearch
networks:
- shopware
mysql
mysql:
image: mysql:8.0
container_name: shopware-mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
networks:
- shopware
elasticsearch
elasticsearch:
image: elasticsearch:7.17.0
container_name: shopware-es
environment:
- discovery.type=single-node
volumes:
- es_data:/usr/share/elasticsearch/data
networks:
- shopware
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 shopware:5 image: shopware/production:latest6 container_name: shopware7 restart: unless-stopped8 environment:9 DATABASE_URL: mysql://${DB_USER}:${DB_PASSWORD}@mysql:3306/${DB_NAME}10 APP_URL: http://localhost:808011 ELASTICSEARCH_HOSTS: elasticsearch:920012 volumes:13 - shopware_data:/var/www/html14 ports:15 - "8080:80"16 depends_on:17 - mysql18 - elasticsearch19 networks:20 - shopware2122 mysql:23 image: mysql:8.024 container_name: shopware-mysql25 environment:26 MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}27 MYSQL_DATABASE: ${DB_NAME}28 MYSQL_USER: ${DB_USER}29 MYSQL_PASSWORD: ${DB_PASSWORD}30 volumes:31 - mysql_data:/var/lib/mysql32 networks:33 - shopware3435 elasticsearch:36 image: elasticsearch:7.17.037 container_name: shopware-es38 environment:39 - discovery.type=single-node40 volumes:41 - es_data:/usr/share/elasticsearch/data42 networks:43 - shopware4445volumes:46 shopware_data:47 mysql_data:48 es_data:4950networks:51 shopware:52 driver: bridge53EOF5455# 2. Create the .env file56cat > .env << 'EOF'57DB_ROOT_PASSWORD=rootpassword58DB_NAME=shopware59DB_USER=shopware60DB_PASSWORD=changeme61EOF6263# 3. Start the services64docker compose up -d6566# 4. View logs67docker 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/shopware/run | bashTroubleshooting
- Shopware installation wizard fails: Ensure DATABASE_URL format is exactly mysql://user:password@mysql:3306/database and MySQL is fully started
- Elasticsearch connection refused errors: Verify Elasticsearch container has enough memory and set ES_JAVA_OPTS="-Xms1g -Xmx1g" environment variable
- Product search returns no results: Check Shopware admin under Settings > Extensions > Shopware Search to rebuild Elasticsearch indices
- MySQL connection timeout during setup: Add 'wait_timeout=28800' to MySQL configuration and ensure containers start in correct dependency order
- Shopware admin panel shows 500 errors: Check PHP memory limit in production image and verify all required PHP extensions are loaded
- Elasticsearch cluster health yellow/red: Increase vm.max_map_count on Docker host with 'sysctl -w vm.max_map_count=262144'
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
Components
shopwaremysqlelasticsearch
Tags
#shopware#php#headless#enterprise
Category
E-Commerce & BusinessAd Space
Shortcuts: C CopyF FavoriteD Download