Start Design Your Online Store

Calendar is loading...
- Available
- Booked
- Pending
Whats App

Prestashop on Docker/ Docker-Compose Guide

Yes Soft 2
Post Image

In this quick blog, I shall provide the method to create a Docker-Compose file of Prestashop.

Pulling the Images

First, we need a MySQL instance of docker. I shall be using MariaDB mariadb:10.1 since I already have it.

Then, we create a folder which will contain the project.

mkdir perstashop

After that, we create a docker-compose.yml file, then we start by adding the image.

version = '3'
# Our Database
image: 'bitnami/mariadb:10.1'
        - MARIADB_USER=bn_prestashop
        - MARIADB_DATABASE=bitnami_prestashop
# I exposed these 2 ports because MySQL use by default 33060, this way we can use either images, MySQL or MariaDB
        - "3306:3306"
        - "33060:33060"
# Pay Special Attention to the name, and watch for the memo bellow
image: "prestashop/prestashop:1.7-7.2-fpm"
    - mysql
   # To Navigate the Project
    - '80:80'
    - '443:443'
   # So I have access to configuration files of the Perstashop Project
    - "./config/:/var/www/html/config/" 

You can find the images of Prestashop here. This image contains a working PHP, Working Apache/PHP.

Now pay attention to a very important thing. If you want the latest tag, it will be running on PHP 5 at the time of writing this. This is why we changed the tag. If you want to use PHP 7, you need to install the tag responsible for this which is – again at the time of writing this – 1.7-7.2-fpm.

Now we run the package using docker-compose up, I’m not using -d here for debugging purposes and we can start the website once everything is set, we go to localhost on the browser.

When we arrive at the database, you should put db as the address, choose a database config that suits you. Then, voilà, everything is set!

Categories : Blog, e-commerce

User Avatar
Yes Soft ( Yes Soft )

There Is No Biography

: 27
: Yes Soft
« »


Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2022 Yes Soft - All right reserved.
Implemented By Yes Soft Team.