PrestaShop
E-commerce solution for online stores.
Overview
PrestaShop is an open-source e-commerce platform built on PHP that enables businesses to create professional online stores with comprehensive product management, order processing, and payment integration capabilities. Originally launched in 2007, PrestaShop has evolved into a feature-rich solution supporting over 300,000 merchants worldwide, offering multilingual and multi-currency support, extensive customization options through themes and modules, and robust inventory management tools that make it suitable for businesses ranging from small startups to large enterprises.
This Docker stack combines PrestaShop with MySQL 8.0 to create a complete e-commerce environment where PrestaShop handles the web storefront, administrative interface, and business logic while MySQL provides the relational database backend for storing product catalogs, customer data, orders, and configuration settings. The MySQL InnoDB storage engine ensures ACID compliance for financial transactions, while PrestaShop's modular architecture allows integration with payment gateways, shipping providers, and marketing tools through its extensive marketplace ecosystem.
This configuration is ideal for developers building e-commerce solutions, digital agencies deploying client stores, and businesses seeking a self-hosted alternative to SaaS platforms like Shopify. The combination provides complete control over data, unlimited customization possibilities, and the ability to integrate with existing business systems while avoiding monthly subscription fees and transaction-based pricing models typical of hosted e-commerce solutions.
Key Features
- Multi-store management allowing multiple shops from single PrestaShop installation with shared or separate inventories
- Advanced product catalog system with unlimited categories, attributes, combinations, and digital product support
- Built-in SEO optimization tools including friendly URLs, meta tags management, and sitemap generation
- Comprehensive order management workflow with customizable statuses, automated emails, and invoice generation
- MySQL 8.0 JSON data type support for flexible product attribute storage and complex catalog structures
- Integrated customer relationship management with segmentation, loyalty programs, and purchase history tracking
- Extensive payment gateway ecosystem with 250+ payment modules including PayPal, Stripe, and regional providers
- Multi-currency and multi-language support with automatic currency conversion and localized checkout processes
Common Use Cases
- 1Small to medium businesses launching their first online store with professional e-commerce features
- 2Digital agencies developing custom e-commerce solutions for clients requiring specific integrations
- 3Retail businesses migrating from hosted platforms to gain full control over their online presence
- 4B2B companies needing wholesale pricing, customer-specific catalogs, and bulk ordering capabilities
- 5Multi-brand retailers managing multiple storefronts with shared inventory and centralized administration
- 6International businesses requiring multi-currency support and localized shopping experiences
- 7Developers prototyping e-commerce applications or testing payment gateway integrations
Prerequisites
- Minimum 2GB RAM recommended for PrestaShop with MySQL 8.0 for optimal performance
- Port 8080 available on host system for accessing PrestaShop web interface
- Basic understanding of e-commerce concepts like product attributes, tax rules, and payment flows
- MySQL administration knowledge for database maintenance and performance optimization
- SSL certificate and domain configuration knowledge for production deployment
- Familiarity with PrestaShop module system for extending functionality
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 prestashop: 3 image: prestashop/prestashop:latest4 container_name: prestashop5 restart: unless-stopped6 environment: 7 DB_SERVER: mysql8 DB_NAME: ${DB_NAME}9 DB_USER: ${DB_USER}10 DB_PASSWD: ${DB_PASSWORD}11 volumes: 12 - prestashop_data:/var/www/html13 ports: 14 - "8080:80"15 depends_on: 16 - mysql17 networks: 18 - prestashop1920 mysql: 21 image: mysql:8.022 container_name: prestashop-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 - prestashop3233volumes: 34 prestashop_data: 35 mysql_data: 3637networks: 38 prestashop: 39 driver: bridge.env Template
.env
1DB_ROOT_PASSWORD=rootpassword2DB_NAME=prestashop3DB_USER=prestashop4DB_PASSWORD=changemeUsage Notes
- 1Docs: https://docs.prestashop-project.org/
- 2Access at http://localhost:8080 - complete installation wizard
- 3IMPORTANT: Delete /install folder after setup for security
- 4Admin panel at /admin-dev (or renamed admin folder)
- 5Modules marketplace for payments, shipping, themes
- 6Auto-generated admin folder name shown during install
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
prestashop
prestashop:
image: prestashop/prestashop:latest
container_name: prestashop
restart: unless-stopped
environment:
DB_SERVER: mysql
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWD: ${DB_PASSWORD}
volumes:
- prestashop_data:/var/www/html
ports:
- "8080:80"
depends_on:
- mysql
networks:
- prestashop
mysql
mysql:
image: mysql:8.0
container_name: prestashop-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:
- prestashop
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 prestashop:5 image: prestashop/prestashop:latest6 container_name: prestashop7 restart: unless-stopped8 environment:9 DB_SERVER: mysql10 DB_NAME: ${DB_NAME}11 DB_USER: ${DB_USER}12 DB_PASSWD: ${DB_PASSWORD}13 volumes:14 - prestashop_data:/var/www/html15 ports:16 - "8080:80"17 depends_on:18 - mysql19 networks:20 - prestashop2122 mysql:23 image: mysql:8.024 container_name: prestashop-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 - prestashop3435volumes:36 prestashop_data:37 mysql_data:3839networks:40 prestashop:41 driver: bridge42EOF4344# 2. Create the .env file45cat > .env << 'EOF'46DB_ROOT_PASSWORD=rootpassword47DB_NAME=prestashop48DB_USER=prestashop49DB_PASSWORD=changeme50EOF5152# 3. Start the services53docker compose up -d5455# 4. View logs56docker 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/prestashop/run | bashTroubleshooting
- PrestaShop installation wizard shows database connection error: Verify DB_SERVER environment variable matches MySQL container name and ensure both containers are on same network
- MySQL container fails to start with 'data directory not empty': Remove mysql_data volume or ensure MYSQL_ROOT_PASSWORD matches existing database configuration
- PrestaShop admin panel shows 'For security reasons, you cannot connect to the admin panel': Delete or rename the /install directory from prestashop_data volume after completing setup wizard
- Product images not displaying correctly: Check file permissions in prestashop_data volume and ensure img/ directory is writable by web server
- Performance issues during peak traffic: Increase MySQL InnoDB buffer pool size and enable PrestaShop's built-in cache system through Performance settings
- Email notifications not sending from PrestaShop: Configure SMTP settings in Advanced Parameters > E-mail or set up mail server container in the stack
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