LouisBertin / prestashop1.7-docker-lamp

A docker stack to run Prestashop locally
8 stars 1 forks source link

Prestashop 1.7 docker configuration

Stack defines to run Prestashop 1.7.X, you have to download the latest stable version here and extract it into the www folder or use the Prestashop repository on Github

Then, you can follow the Prestashop installer instructions.

Here is the result provided by the Prestashop system requirements tool :

Prestashop system requirements

⚠️ Prestashop DB credentials during installation

Of course you can change everything in the docker-compose.yml

⚠️ Before anything else

⚠️ macOS users - update 2023 - better overall performance

You can use OrbStack instead of NFS and Docker Desktop : https://orbstack.dev/

⚠️ macOS users - enable NFS - (old method)

If you need to speed up your web container, I advice you to enable NFS on your mac and in the docker-compose.yml

services:
    web:
        container_name: ${PROJECT_NAME}_web
        build:
            context: ./conf
            args:
                PHP_VERSION: '7.3'
        ports:
            - "80:80"
        volumes:
            - nfsmount:/app/
        links:
            - db:db

volumes:
  nfsmount:
      driver: local
      driver_opts:
          type: nfs
          o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
          device: ":${PWD}/www"

If you need more informations about NFS, you can read the excellent article about this topic written by Jeff Geerling : https://www.jeffgeerling.com/blog/2020/revisiting-docker-macs-performance-nfs-volumes

Useful commands:

Mailcatcher

You can see all the email send by Prestashop on the Mailcatcher web interface : http://localhost:1080. Here is the Prestashop SMTP configuration for MailCatcher and Docker :

mailcatcher

General information

ℹ️ If your project is managed by VCS (Git), you can find your composer.json and composer.json.lock on the official Prestashop Github Repository