Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prestashop Test/Production Server Best Practices

We have an eShop build on prestashop and we are developing new features every week. I'm writing here because I don't find the correct way to update our production environment with the changes, without having to upload all the code again or having to upload the modified files manually.

Now we work like this:

  • Our developers work with local copies connected to a GIT repo.
  • Once we have some new features and we want to create a new release I download the latest version from the repo and test it locally on another computer.

=> HERE comes the part that I don't like... :)

  • Once all the tests have been passed in my local copy we take all the files that have been modified (looking at the commits) and we upload them manually to the development environment.
  • We test it again and if it works we upload the same files to the production environment.

We have been thinking in linking both environments source files with the repo as well, but I don't link it because I don't want to have the .git folder published messing my production code.

I didn't find the way of having a tested copy of our code pushed at our GIT REPOSITORY and update the servers automatically, without having to upload the files manually or having to upload entire folders (themes, classes, etc...) via FTP.

Is there anybody working with prestashop and GIT and having a nice automated system to do all this? :)

Many thanks in advance!

Regards,

Jordi

like image 880
Jordi Corominas Avatar asked Apr 18 '13 11:04

Jordi Corominas


1 Answers

Here is the workflow we use, it's (I guess) pretty standard:

  • one git repo
  • preprod domain
  • prod domain

All the development is done on branches, when it's ready to ship we merge on the master. So on the preprod we pull the branch we are working on, and on the production we only pull the master. The preprod and prod domain are on the same server, it's just a sub-domain with a htaccess to protect it.

We use this not only for Prestashop but for every thing, it works well.

For the part where you want to automatically pull the code, it must be possible (à la Heroku). But for me the most important is: you should git everywhere and forget about FTP. It's really easier and you're sure everything you need is updated.

like image 154
romainberger Avatar answered Oct 02 '22 15:10

romainberger