Jump to content

Prestashop very slow with Docker


Yggdrasill

Recommended Posts

Hi, 

I'm using Prestashop with Docker for local development. My setup:

- Docker for mac : latest version available

- Prestashop : 1.7.6.4

- All requirements are setup thanks to the Prestashop official requirements tool
 

Pages take 10 to 30 seconds to load even if the cache is enable

Any ideas? That's really uncomfortable to develop new features..

Edited by Yggdrasill (see edit history)
  • Like 2
Link to comment
Share on other sites

Finally, I found a solution to my issue who could be helpful for other people.

On OSX, there is a problem between host and containers synchronization. It is very slow because by default this is set to consistent. The documentation is very exhaustive on this subject: https://docs.docker.com/docker-for-mac/osxfs-caching/. It is therefore necessary to add to its volume which contains the files :cached

Otherwise, there is also the docker-sync solution : http://docker-sync.io/ Which is in theory even more powerful but a bit longer to configure

Additional resources : https://dev.to/kovah/cut-your-docker-for-mac-response-times-in-half-with-docker-sync-1e8j

  • Like 3
Link to comment
Share on other sites

  • 4 months later...
21 hours ago, webspilka said:

hi 

I have same problem with PrestaShop

Can you share your docker file as example ?

When I install presta in docker without volumes all works very fast. But when I add volumes to docker config, I get very slow response from server ((

Hi! I've made a Github repository with my Docker config here : https://github.com/LouisBertin/prestashop1.7-docker-lamp

Enjoy!

Link to comment
Share on other sites

  • 2 years later...
On 9/6/2020 at 6:12 PM, webspilka said:

cool, with this config everything works dozens of times faster))

thank you Yggdrasill

can you help me !!    how can i set that in my prestashop of docker in local                    carzy very low when I cancel the cache    

Edited by zhanyia23 (see edit history)
Link to comment
Share on other sites

Hi @zhanyia23

How did you install your PrestaShop? 

Run a `cp .env.dist .env` and change the PROJECT_NAME variable
Then, you can copy PrestaShop files inside the `www` folder and run `docker-compose up -d`

And if you are using macOS or Linux, you can use OrbStack : https://orbstack.dev/

Edited by Yggdrasill (see edit history)
Link to comment
Share on other sites

You seems to have an issue with my Docker repository : 

- You have to clone everything from here : https://github.com/LouisBertin/prestashop1.7-docker-lamp
- Then, select the PrestaShop version you need : https://prestashop.fr/versions/
- Extract the content in a `www` folder at the root of the files you get from here : https://github.com/LouisBertin/prestashop1.7-docker-lamp

Link to comment
Share on other sites

4 minutes ago, Yggdrasill said:

You seems to have an issue with my Docker repository : 

- You have to clone everything from here : https://github.com/LouisBertin/prestashop1.7-docker-lamp
- Then, select the PrestaShop version you need : https://prestashop.fr/versions/
- Extract the content in a `www` folder at the root of the files you get from here : https://github.com/LouisBertin/prestashop1.7-docker-lamp

i dont understand the  www  folder  which is       you see my picture        i copy the prestashop file in the folder

Snipaste_2023-07-26_19-54-28.png

Link to comment
Share on other sites

13 minutes ago, Yggdrasill said:

You seems to have an issue with my Docker repository : 

- You have to clone everything from here : https://github.com/LouisBertin/prestashop1.7-docker-lamp
- Then, select the PrestaShop version you need : https://prestashop.fr/versions/
- Extract the content in a `www` folder at the root of the files you get from here : https://github.com/LouisBertin/prestashop1.7-docker-lamp

is it right???

Snipaste_2023-07-26_20-03-22.png

Link to comment
Share on other sites

5 minutes ago, Yggdrasill said:

You can keep this version. This is why the project is run into docker containers. You can use a different NodeJS version of the one installed on your system

the same old error about  php     oh my god

Snipaste_2023-07-26_20-30-49.png

Link to comment
Share on other sites

7 minutes ago, Yggdrasill said:

Yes its better to use UTC for the date.timezone
I'll change it

Which version of windows are you using ? 
And how did you install Docker ? 

i installed docker desktop version        cause the version of windows is pretty low  so  i  installed WSL 1  

Snipaste_2023-07-26_21-19-15.png

Snipaste_2023-07-26_21-18-03.png

Snipaste_2023-07-26_21-23-07.png

Link to comment
Share on other sites

3 minutes ago, Yggdrasill said:

Quite an old version but it has to work. 

Run `cp .env.dist .env` and replace the value for `PROJECT_NAME`
Then : `docker-compose up -d --build`, to rebuild each containers

the PROJECT_NAME  is from customize?    Or any other name

Snipaste_2023-07-26_21-38-46.png

Link to comment
Share on other sites

 

9 minutes ago, Yggdrasill said:

Quite an old version but it has to work. 

Run `cp .env.dist .env` and replace the value for `PROJECT_NAME`
Then : `docker-compose up -d --build`, to rebuild each containers

just now  i git a php rep   8 version      it 's too long adn i m waiting it              

Snipaste_2023-07-26_21-40-33.png

Edited by zhanyia23 (see edit history)
Link to comment
Share on other sites

9 minutes ago, Yggdrasill said:

Yes, test-presta is good

But leave the original values for PHP_VERSION and NODEJS_VERSION. You'll get errors if you change them:

PHP_VERSION=7.4
NODEJS_VERSION=12

Give up?     cost 30min..... and  dont know how long 

Snipaste_2023-07-26_21-51-55.png

Link to comment
Share on other sites

1 hour ago, Yggdrasill said:

Yes, test-presta is good

But leave the original values for PHP_VERSION and NODEJS_VERSION. You'll get errors if you change them:

PHP_VERSION=7.4
NODEJS_VERSION=12

I successfully installed  with php8           PrestaShop installation requires the zip extension to be enabled.    figure it out

in the php.ini  ???       but the html folder in the docker  is  null????       the local prestashop files are not mapped on docker ~~~~    

Snipaste_2023-07-26_23-41-05.png

Snipaste_2023-07-26_23-41-21.png

Snipaste_2023-07-26_23-41-34.png

Link to comment
Share on other sites

11 hours ago, Yggdrasill said:

I think you have to learn more about Docker because it works out of the box. Your issue seem related to Docker volumes

Here is the result when I copy PrestaShop installation files into the `www` folder

 

Screenshot 2023-07-26 at 18.11.20.png

did you make the setting  what could sharing file  between the local to docker online

 

Snipaste_2023-07-27_11-14-18.png

Link to comment
Share on other sites

On 7/27/2023 at 7:18 PM, Yggdrasill said:

It's different on macOS.

But I think you should add this path: C:\Users\PRESTA\

Be careful, I think you should have your username inside the path : 

Run the command `pwd` on Linux subsystem and `cd` on Windows to get your path

thank you very much !!!  with me slove these problem ~ I I have already used the  vscode with the    "remote ssh" plugin  to conect service . 

actually,i have a macbook air 2015   but  it pretty slowly. maybe  I want to try set your code to my mac and look forward to a successful with docker compose~~

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...