Development Environment & Docker Setup
Relevant source files
The following files were used as context for generating this wiki page:
PrestaShop provides a complete Docker-based development environment to preview the source code and develop new features. This environment includes a web server, database, and tools for email testing and automated UI validation.
Sources: README.md:104-106
Docker Architecture & Services
The development environment utilizes Docker Compose to orchestrate multiple services required for the application. By default, the system binds port 8001 for the web server and port 1080 for email testing.
The diagram shows the relationship between the local host ports and the internal Docker services.
Sources: README.md:112-114, README.md:129
Service Components
| Service | Default Port | Purpose |
|---|---|---|
| PrestaShop Web | 8001 | Serves the Frontend and Back Office (admin-dev) |
| Database | Internal | MySQL or MariaDB storage for shop data |
| Maildev | 1080 | Intercepts and displays outgoing emails for testing |
Sources: README.md:112-114, docker-compose.yml, docker-compose.mariadb.yml
Initial Setup & Configuration
You start the environment by running a specific make command. The container checks for the existence of app/config/parameters.php on startup; if the file is missing, it triggers an auto-installation process.
Quick Start Commands
- Start the environment:
make docker-start - Access Frontend:
http://localhost:8001 - Access Backend:
http://localhost:8001/admin-dev
Sources: README.md:108-114, README.md:133-134
Environment Variables for Credentials
You can customize admin credentials by setting environment variables before executing docker compose up.
| Variable | Description | Default Value |
|---|---|---|
ADMIN_MAIL | Administrator email address | demo@prestashop.com |
ADMIN_PASSWD | Administrator password | Pr3st4Sh0P |
Sources: README.md:121-125
Automated Testing Environment
The development environment supports extensive User Interface (UI) testing using Playwright, Mocha, and Chai. These tests are located in the tests/UI directory and require Node.js v10.x or newer.
This sequence illustrates the workflow for executing automated UI tests against the running PrestaShop container.
Sources: tests/UI/README.md:5-20, tests/README.md:20-23
UI Test Configuration
Tests are configured via an .env file (copied from .env.ci).
| Parameter | Description | Default |
|---|---|---|
URL_FO | Front Office URL | http://localhost/prestashop/ |
DB_SERVER | Database server address | 127.0.0.1 |
BROWSER | Test browser engine | chromium |
HEADLESS | Run without GUI | true |
Sources: tests/UI/README.md:38-80
System Requirements
The core application requires specific server-side software if running outside the provided Docker environment.
- PHP: Version 8.1 or higher.
- Database: MySQL 5.6+ or equivalent flavors (MariaDB, Percona).
- Web Server: Apache or Nginx (recommended).
Sources: README.md:86-90, INSTALL.txt:63-65
Summary
The PrestaShop development environment is a containerized stack designed for rapid prototyping and testing. By utilizing docker-compose.yml and provided make commands, developers can deploy a standardized shop instance with integrated email catching and UI testing capabilities. The environment is highly configurable through environment variables and local .env files for testing.
Sources: README.md:104-106, tests/UI/README.md:25-30