Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PrestaShop 1.7 local development using docker

I realize this might be a basic question. I just have not found a clear tutorial guide yet.

I have been learning about docker and I now understand the basics. I also have the mysql and prestashop containers up and running in Ubuntu 16 and have successfully ran the initial PrestaShop website installation on my local computer.

Question: My goal being PrestaShop development using docker, how do I access the files locally other than through the container from the terminal so that I can modify them using my editor?

like image 522
TheMokuaBrand Avatar asked Mar 18 '26 15:03

TheMokuaBrand


1 Answers

This is my docker-compose.yml that I use to develop Prestashop themes locally. Not perfect as I need to install prestashop manually the first time.

N.B. [theme-name] needs to be the same as the name in your theme config.yml or it won't work

version: "3"

services:
  my-prestashop:
    image: "prestashop/prestashop:1.7"
    ports:
      - "8080:80"
    environment:
      - DB_SERVER=my-mysql
      - PS_DEV_MODE=1
    networks:
      - my-network
    volumes:
      - .:/var/www/html/themes/[theme-name]

  my-mysql:
    image: "mysql:5.7"
    ports:
      - "3307:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=admin
    networks:
      - my-network

networks:
  my-network:

More info on how to setup the prestashop container here: https://hub.docker.com/r/prestashop/prestashop/

like image 77
StefanoGermani Avatar answered Mar 20 '26 03:03

StefanoGermani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!