PrestaShop is a European open source e-commerce platform with, by its own admission, currently over 300,000 installations. Today I am installing this PHP software on my server. Some Linux, Docker and Docker Compose knowledge is required for this tutorial.
Step 1: Install PrestaShop
I create a new directory called “prestashop” on my server:
$ mkdir prestashop
$ cd prestashop
version: '2'
services:
mariadb:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=prestashop
- MYSQL_USER=prestashop
- MYSQL_PASSWORD=prestashop
volumes:
- ./mysql:/var/lib/mysql
expose:
- 3306
networks:
- shop-network
restart: always
prestashop:
image: prestashop/prestashop:1.7.7.2
ports:
- 8090:80
depends_on:
- mariadb
volumes:
- ./prestadata:/var/www/html
- ./prestadata/modules:/var/www/html/modules
- ./prestadata/themes:/var/www/html/themes
- ./prestadata/override:/var/www/html/override
environment:
- PS_INSTALL_AUTO=0
networks:
- shop-network
restart: always
networks:
shop-network:
Unfortunately, the current Lastest version did not work for me, so I installed the “1.7.7.2” version. This file is started via Docker Compose:
$ docker-compose -f prestashop.yml up
After that I can call my PrestaShop server and continue the installation via interface.
I quit Docker-Compose with “Ctrl C” and call the subfolder “prestadata” (“cd prestadata”). There the “install” folder must be deleted with “rm -r install”. There is also an “admin” folder, in my case “admin697vqoryt”. I remember this abbreviation for later and start the server again via Docker Compose:
$ docker-compose -f prestashop.yml up -d
Step 2: Test store
After reboot, I test through my Presta store installation and also access the admin interface under “shop-url/admin-shortcuts”.