docker icon indicating copy to clipboard operation
docker copied to clipboard

[Documentation] Handling upgrades

Open freechelmi opened this issue 5 years ago • 7 comments

I m' a bit confused by the "whole /var/www/html" volume :

  • Usually volumes only contains user data not app "static" data
  • How would one handled a 1.6-1.7 upgrade with the whole volume ?
  • When he would compose pull/rm/up with 1.7 , he will need to manually start an upgrade using the web GUI ?
  • That sounds against docker usage.

freechelmi avatar Jan 17 '20 14:01 freechelmi

Hi @freechelmi have you figured it out? There is no proper documentation on which directories should be mounted as volumes an nothing much with google either 😢

Some reference: https://github.com/PrestaShop/docker/issues/105#issuecomment-529931478 https://github.com/PrestaShop/docker/issues/77#issuecomment-306766884

Adding the following folder into volume is enough?

  • /var/www/html/img
  • /var/www/html/app/config
  • /var/www/html/modules
  • /var/www/html/var/logs

poc @Quetzacoalt91, can you help? thank.

jean-io avatar Dec 10 '20 15:12 jean-io

There is no proper documentation because there is no userland: https://github.com/PrestaShop/PrestaShop/issues/12984 As you can see the docker file is really simple and if you want to customize it it's really easy: https://github.com/PrestaShop/docker/blob/master/images/1.7.7.0/7.3-fpm/Dockerfile#L7

Since we don't plan to create a userland before the next major, we will not implement it in our docker images. Feel free to create a pull request if know what to do exactly, we don't deploy PrestaShop docker instances in production so we never upgrade them.

PierreRambaud avatar Dec 10 '20 16:12 PierreRambaud

Thank @PierreRambaud for your feedback.

we don't deploy PrestaShop docker instances in production.

This should be also documented that Prestashop cannot be run in docker for production. I will try to find a work around on my own.

jean-io avatar Dec 10 '20 17:12 jean-io

In fact, you can deploy your PrestaShop instance on Production, but you have to consider the container instance like a Virtual Machine instance. The whole /var/www/html can be in a volume, and each time you upgrade, you use a different version of PHP. It's not the best way to do it, but it does the job.

PierreRambaud avatar Dec 10 '20 17:12 PierreRambaud

Ok. It will do the job. Cannot wait for the 1.8 😄

jean-io avatar Dec 10 '20 17:12 jean-io

Did anybody worked on this ? I'm not sure.

freechelmi avatar May 04 '21 08:05 freechelmi

Did anybody worked on this ? I'm not sure.

I wish we could invest time on this topic but we cannot afford this level of maintenance as we already have a ton of work to do on other topics 😅 . If you can help please be our guest and submit a PR 😉 .

matks avatar Oct 08 '21 08:10 matks