Fork me on GitHub

Herr Knedel/Creative out of the crisis: professional webshop with PrestaShop

Created Sun, 11 Apr 2021 00:00:00 +0000 Modified Mon, 28 Mar 2022 18:10:09 +0000 Difficulty level: Very athletic

286 Words

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:

x
+
Terminal

$ mkdir prestashop
$ cd prestashop

After that I go to the prestashop directory and create new file called “prestashop.yml” with the following content.

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:

x
+
Terminal

$ docker-compose -f prestashop.yml up

It is best to get a fresh coffee, because the process takes a long time. Only when the following text appears, the interface can be used. 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:
x
+
Terminal

$ 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”.