PrestaShop E-commerce Platform
Open source e-commerce with PrestaShop, MySQL, and caching.
Overview
PrestaShop is a feature-rich open-source e-commerce platform written in PHP that powers over 300,000 online stores worldwide. Originally launched in 2007, PrestaShop offers a comprehensive solution for building and managing online stores with support for multiple languages, currencies, and payment gateways. The platform includes built-in SEO tools, product catalog management, order processing, customer management, and a modular architecture with thousands of available themes and modules. This stack combines PrestaShop with MySQL for robust data storage, Redis for high-performance caching and session management, NGINX as a high-performance web server and reverse proxy, and phpMyAdmin for database administration. The MySQL database handles all product data, customer information, orders, and configuration settings, while Redis significantly improves page load times by caching frequently accessed data and storing user sessions. NGINX serves static assets efficiently and handles SSL termination, providing better performance than Apache for high-traffic scenarios. This combination is ideal for merchants launching new online stores, developers building e-commerce solutions for clients, or businesses migrating from hosted platforms to self-managed infrastructure. The stack provides enterprise-level performance and scalability while maintaining the flexibility to customize every aspect of the shopping experience, from checkout flows to inventory management.
Key Features
- Multi-store management allowing multiple shops from single PrestaShop installation
- Redis-powered session storage and object caching for improved checkout performance
- MySQL InnoDB storage engine with ACID compliance for reliable transaction processing
- NGINX FastCGI processing with optimized PHP-FPM integration for PrestaShop
- phpMyAdmin interface for managing product catalogs, customer data, and order history
- PrestaShop's built-in multi-language and multi-currency support with localized URLs
- Redis Pub/Sub messaging for real-time inventory updates across multiple store instances
- NGINX rate limiting and connection throttling to prevent cart abandonment during traffic spikes
Common Use Cases
- 1Small to medium online retailers launching their first e-commerce website
- 2Digital agencies building custom e-commerce solutions for multiple clients
- 3Existing merchants migrating from Shopify or WooCommerce to self-hosted platform
- 4Multi-brand retailers managing separate storefronts with shared inventory
- 5International businesses requiring multi-language and multi-currency support
- 6Developers creating custom B2B e-commerce portals with specialized pricing logic
- 7Fashion and electronics retailers needing advanced product variation management
Prerequisites
- Docker Engine 20.10+ and Docker Compose 2.0+ installed on host system
- Minimum 2GB RAM available (MySQL 1GB, PrestaShop 512MB, Redis 256MB, NGINX 128MB)
- Ports 80, 443, and 8081 available on host system for web and database access
- Basic understanding of PHP application deployment and MySQL database management
- SSL certificate files if enabling HTTPS in production environment
- NGINX configuration knowledge for customizing reverse proxy and caching rules
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 mysql: 3 image: mysql:8.04 environment: 5 - MYSQL_DATABASE=prestashop6 - MYSQL_USER=prestashop7 - MYSQL_PASSWORD=${MYSQL_PASSWORD}8 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}9 volumes: 10 - mysql_data:/var/lib/mysql11 networks: 12 - prestashop_net1314 redis: 15 image: redis:7-alpine16 volumes: 17 - redis_data:/data18 networks: 19 - prestashop_net2021 prestashop: 22 image: prestashop/prestashop:latest23 environment: 24 - DB_SERVER=mysql25 - DB_NAME=prestashop26 - DB_USER=prestashop27 - DB_PASSWD=${MYSQL_PASSWORD}28 - PS_DOMAIN=localhost29 - PS_FOLDER_ADMIN=admin12330 - PS_FOLDER_INSTALL=install31 - PS_ENABLE_SSL=032 volumes: 33 - prestashop_data:/var/www/html34 depends_on: 35 - mysql36 networks: 37 - prestashop_net3839 nginx: 40 image: nginx:alpine41 ports: 42 - "80:80"43 - "443:443"44 volumes: 45 - ./nginx.conf:/etc/nginx/nginx.conf:ro46 - prestashop_data:/var/www/html:ro47 depends_on: 48 - prestashop49 networks: 50 - prestashop_net5152 phpmyadmin: 53 image: phpmyadmin:latest54 ports: 55 - "8081:80"56 environment: 57 - PMA_HOST=mysql58 depends_on: 59 - mysql60 networks: 61 - prestashop_net6263volumes: 64 mysql_data: 65 redis_data: 66 prestashop_data: 6768networks: 69 prestashop_net: .env Template
.env
1# PrestaShop2MYSQL_PASSWORD=secure_mysql_password3MYSQL_ROOT_PASSWORD=secure_root_password45# Shop at http://localhost6# Admin at http://localhost/admin1237# Delete /install after setupUsage Notes
- 1Shop at http://localhost
- 2Admin at http://localhost/admin123
- 3Complete installation wizard first
- 4Delete /install folder after setup
- 5Configure caching modules for Redis
Individual Services(5 services)
Copy individual services to mix and match with your existing compose files.
mysql
mysql:
image: mysql:8.0
environment:
- MYSQL_DATABASE=prestashop
- MYSQL_USER=prestashop
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
networks:
- prestashop_net
redis
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
networks:
- prestashop_net
prestashop
prestashop:
image: prestashop/prestashop:latest
environment:
- DB_SERVER=mysql
- DB_NAME=prestashop
- DB_USER=prestashop
- DB_PASSWD=${MYSQL_PASSWORD}
- PS_DOMAIN=localhost
- PS_FOLDER_ADMIN=admin123
- PS_FOLDER_INSTALL=install
- PS_ENABLE_SSL=0
volumes:
- prestashop_data:/var/www/html
depends_on:
- mysql
networks:
- prestashop_net
nginx
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- prestashop_data:/var/www/html:ro
depends_on:
- prestashop
networks:
- prestashop_net
phpmyadmin
phpmyadmin:
image: phpmyadmin:latest
ports:
- "8081:80"
environment:
- PMA_HOST=mysql
depends_on:
- mysql
networks:
- prestashop_net
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 mysql:5 image: mysql:8.06 environment:7 - MYSQL_DATABASE=prestashop8 - MYSQL_USER=prestashop9 - MYSQL_PASSWORD=${MYSQL_PASSWORD}10 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}11 volumes:12 - mysql_data:/var/lib/mysql13 networks:14 - prestashop_net1516 redis:17 image: redis:7-alpine18 volumes:19 - redis_data:/data20 networks:21 - prestashop_net2223 prestashop:24 image: prestashop/prestashop:latest25 environment:26 - DB_SERVER=mysql27 - DB_NAME=prestashop28 - DB_USER=prestashop29 - DB_PASSWD=${MYSQL_PASSWORD}30 - PS_DOMAIN=localhost31 - PS_FOLDER_ADMIN=admin12332 - PS_FOLDER_INSTALL=install33 - PS_ENABLE_SSL=034 volumes:35 - prestashop_data:/var/www/html36 depends_on:37 - mysql38 networks:39 - prestashop_net4041 nginx:42 image: nginx:alpine43 ports:44 - "80:80"45 - "443:443"46 volumes:47 - ./nginx.conf:/etc/nginx/nginx.conf:ro48 - prestashop_data:/var/www/html:ro49 depends_on:50 - prestashop51 networks:52 - prestashop_net5354 phpmyadmin:55 image: phpmyadmin:latest56 ports:57 - "8081:80"58 environment:59 - PMA_HOST=mysql60 depends_on:61 - mysql62 networks:63 - prestashop_net6465volumes:66 mysql_data:67 redis_data:68 prestashop_data:6970networks:71 prestashop_net:72EOF7374# 2. Create the .env file75cat > .env << 'EOF'76# PrestaShop77MYSQL_PASSWORD=secure_mysql_password78MYSQL_ROOT_PASSWORD=secure_root_password7980# Shop at http://localhost81# Admin at http://localhost/admin12382# Delete /install after setup83EOF8485# 3. Start the services86docker compose up -d8788# 4. View logs89docker 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-complete/run | bashTroubleshooting
- PrestaShop installation wizard shows database connection error: Verify MYSQL_PASSWORD environment variable matches DB_PASSWD in PrestaShop service
- Products and categories load slowly after initial setup: Enable PrestaShop's Redis cache module in Back Office > Advanced Parameters > Performance
- NGINX shows 502 Bad Gateway during PrestaShop container startup: Add health check or increase NGINX upstream timeout in configuration file
- phpMyAdmin cannot connect to database: Ensure both services are on prestashop_net network and PMA_HOST matches MySQL service name
- PrestaShop admin panel redirects to installation wizard: Remove install folder from prestashop_data volume and restart container
- Redis connection fails in PrestaShop cache settings: Configure cache servers with redis:6379 as server address in Performance settings
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
prestashopmysqlredisnginxphpmyadmin
Tags
#prestashop#ecommerce#php#shop#multilingual
Category
E-Commerce & BusinessAd Space
Shortcuts: C CopyF FavoriteD Download