PrestaShop / docker

🐳
https://hub.docker.com/r/prestashop/prestashop/
MIT License
259 stars 177 forks source link

Updated the domain update script to update data depending on domain #312

Closed Clovel closed 2 years ago

Clovel commented 2 years ago

Signed-off-by: Clovis Durand cd.clovel19@gmail.com

Questions Answers
Description? Resources like images were not updated when the dynamic host was changed.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? N/A
How to test? Deploy PrestaShop using a docker image on a server, behind an NGINX or Apache reverse proxy. Set a DNS record with a subdomain name to point to this server. Change said record to another subdomain. Check if everything is in place
Possible impacts? None detected so far.

This was tested by inserting the 4 new lines of code in a running instance of PrestaShop in a Docker container. 2 images were used in the test :

Test was conducted in late July of 2022.

Quetzacoalt91 commented 2 years ago

Hello,

That's a toggle we implemented in the first version of the Docker images, because as you know PrestaShop redirects the user when the URL stored in the database does not match. At each restart the IP changes, so it was easier to use this toggle to keep the shop accessible.

This file is supposed to be called at the container startup.

Clovel commented 2 years ago

This file is supposed to be called at the container startup.

I have a use case when on DNS domain change, I automatically restart the container after backing it up in a private docker registry. Thus the need to regenerate lots of things, such as the cache or the htaccess.

Also, as per my testing, I don't need to restart the container for this code to be executed.

These lines basically come from the back-office domain change feature.

Clovel commented 2 years ago

Any news on this ? It seems to have been approved twice over.

matks commented 2 years ago

I think it's safe to be merged 👍 thank you @Clovel