Bagisto E-commerce Platform
Bagisto Laravel e-commerce with MySQL.
Overview
Bagisto is a modern, Laravel-based e-commerce framework that provides a complete foundation for building online stores and marketplaces. Developed by Webkul, Bagisto offers multi-channel selling capabilities, comprehensive inventory management, and built-in support for multi-vendor marketplaces, making it a powerful alternative to Magento or WooCommerce for businesses seeking a flexible PHP-based e-commerce solution. This Docker stack combines Bagisto with MySQL 8.0 for robust relational data storage, Redis for high-speed caching and session management, and Nginx as a reverse proxy to handle web traffic efficiently. The MySQL database stores product catalogs, customer data, and order information with full ACID compliance, while Redis accelerates page load times by caching frequently accessed data and managing user sessions. Nginx serves as the front-end web server, handling static assets and proxying PHP requests to the Bagisto application container. This configuration is ideal for e-commerce businesses, Laravel developers building custom online stores, agencies deploying client shopping platforms, and entrepreneurs launching multi-vendor marketplaces who need a scalable, feature-rich e-commerce solution with professional-grade performance optimization.
Key Features
- Multi-channel selling with support for web, mobile, and social commerce platforms
- Built-in multi-vendor marketplace functionality with vendor management and commission tracking
- Advanced inventory management with configurable products, bundles, and downloadable goods
- MySQL InnoDB storage engine with full-text search capabilities for product catalogs
- Redis-powered session storage and Laravel cache optimization for sub-millisecond response times
- Nginx reverse proxy with HTTP/2 support and static asset optimization
- Laravel Artisan command-line tools for migrations, seeding, and custom development
- Comprehensive admin panel with role-based permissions and multi-language support
Common Use Cases
- 1Small to medium businesses launching their first professional online store
- 2Multi-vendor marketplaces requiring commission management and vendor dashboards
- 3Laravel developers building custom e-commerce solutions for clients
- 4Agencies migrating clients from Magento or Shopify to a self-hosted platform
- 5B2B companies needing advanced inventory management and bulk ordering capabilities
- 6International retailers requiring multi-currency and multi-language support
- 7Developers prototyping e-commerce features in a local development environment
Prerequisites
- Docker and Docker Compose installed on the host system
- Minimum 2GB RAM available (1GB+ for MySQL, 512MB+ for Redis, remainder for Bagisto and Nginx)
- Port 80 available for web traffic (or configure custom port via NGINX_PORT)
- Basic understanding of Laravel framework and PHP development practices
- Database administration knowledge for MySQL backup and maintenance procedures
- SSL certificate and domain configuration for production deployments
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 bagisto: 3 image: bagisto/bagisto:latest4 container_name: bagisto5 restart: unless-stopped6 environment: 7 - DB_HOST=bagisto-mysql8 - DB_DATABASE=bagisto9 - DB_USERNAME=${DB_USER}10 - DB_PASSWORD=${DB_PASSWORD}11 - REDIS_HOST=bagisto-redis12 volumes: 13 - bagisto_storage:/var/www/html/storage14 depends_on: 15 - bagisto-mysql16 - bagisto-redis1718 bagisto-mysql: 19 image: mysql:8.020 container_name: bagisto-mysql21 restart: unless-stopped22 environment: 23 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}24 - MYSQL_DATABASE=bagisto25 - MYSQL_USER=${DB_USER}26 - MYSQL_PASSWORD=${DB_PASSWORD}27 volumes: 28 - mysql_data:/var/lib/mysql2930 bagisto-redis: 31 image: redis:7-alpine32 container_name: bagisto-redis33 restart: unless-stopped34 volumes: 35 - redis_data:/data3637 nginx: 38 image: nginx:alpine39 container_name: bagisto-nginx40 restart: unless-stopped41 ports: 42 - "${NGINX_PORT:-80}:80"43 volumes: 44 - ./nginx.conf:/etc/nginx/nginx.conf:ro45 depends_on: 46 - bagisto4748volumes: 49 bagisto_storage: 50 mysql_data: 51 redis_data: .env Template
.env
1# Bagisto2NGINX_PORT=803DB_USER=bagisto4DB_PASSWORD=bagisto_password5DB_ROOT_PASSWORD=root_passwordUsage Notes
- 1Docs: https://devdocs.bagisto.com/
- 2Store at http://localhost, admin panel at /admin
- 3Complete web installer wizard on first visit
- 4Default admin: admin@example.com / admin123 - change immediately
- 5Laravel Artisan: docker exec bagisto php artisan
- 6Multi-vendor marketplace capabilities available
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
bagisto
bagisto:
image: bagisto/bagisto:latest
container_name: bagisto
restart: unless-stopped
environment:
- DB_HOST=bagisto-mysql
- DB_DATABASE=bagisto
- DB_USERNAME=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- REDIS_HOST=bagisto-redis
volumes:
- bagisto_storage:/var/www/html/storage
depends_on:
- bagisto-mysql
- bagisto-redis
bagisto-mysql
bagisto-mysql:
image: mysql:8.0
container_name: bagisto-mysql
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=bagisto
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
bagisto-redis
bagisto-redis:
image: redis:7-alpine
container_name: bagisto-redis
restart: unless-stopped
volumes:
- redis_data:/data
nginx
nginx:
image: nginx:alpine
container_name: bagisto-nginx
restart: unless-stopped
ports:
- ${NGINX_PORT:-80}:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- bagisto
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 bagisto:5 image: bagisto/bagisto:latest6 container_name: bagisto7 restart: unless-stopped8 environment:9 - DB_HOST=bagisto-mysql10 - DB_DATABASE=bagisto11 - DB_USERNAME=${DB_USER}12 - DB_PASSWORD=${DB_PASSWORD}13 - REDIS_HOST=bagisto-redis14 volumes:15 - bagisto_storage:/var/www/html/storage16 depends_on:17 - bagisto-mysql18 - bagisto-redis1920 bagisto-mysql:21 image: mysql:8.022 container_name: bagisto-mysql23 restart: unless-stopped24 environment:25 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}26 - MYSQL_DATABASE=bagisto27 - MYSQL_USER=${DB_USER}28 - MYSQL_PASSWORD=${DB_PASSWORD}29 volumes:30 - mysql_data:/var/lib/mysql3132 bagisto-redis:33 image: redis:7-alpine34 container_name: bagisto-redis35 restart: unless-stopped36 volumes:37 - redis_data:/data3839 nginx:40 image: nginx:alpine41 container_name: bagisto-nginx42 restart: unless-stopped43 ports:44 - "${NGINX_PORT:-80}:80"45 volumes:46 - ./nginx.conf:/etc/nginx/nginx.conf:ro47 depends_on:48 - bagisto4950volumes:51 bagisto_storage:52 mysql_data:53 redis_data:54EOF5556# 2. Create the .env file57cat > .env << 'EOF'58# Bagisto59NGINX_PORT=8060DB_USER=bagisto61DB_PASSWORD=bagisto_password62DB_ROOT_PASSWORD=root_password63EOF6465# 3. Start the services66docker compose up -d6768# 4. View logs69docker 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/bagisto-ecommerce-stack/run | bashTroubleshooting
- Bagisto shows database connection error: Verify DB_HOST, DB_USERNAME, and DB_PASSWORD environment variables match MySQL container settings
- Web installer fails during setup: Check MySQL container is fully initialized by examining logs with docker logs bagisto-mysql
- Laravel cache issues or session problems: Restart Redis container and clear Laravel cache with docker exec bagisto php artisan cache:clear
- Nginx 502 Bad Gateway errors: Ensure Bagisto container is running and accessible on its internal network port
- File upload or storage permissions errors: Verify bagisto_storage volume is properly mounted and container has write permissions
- Performance issues with large catalogs: Increase MySQL innodb_buffer_pool_size and configure Redis maxmemory settings based on available RAM
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