6

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

4

2 回答 2

7

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.

于 2013-04-18T14:08:39.450 回答
0

我认为您的回答也不正确:)

如果您在 Web 服务器上使用 apache,请检查此代码

这需要存在于您的 .htaccess 文件中

RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule . - [E=HTTP_AUTHORIZATION:%1]

当然你需要有 .htpasswd 文件。

它的意思是任何名称以“。”开头的文件或文件夹。点,您需要先进行自动化,然后才能访问它。

在此处查看有关 Mod 重写的更多信息:http ://httpd.apache.org/docs/2.2/rewrite/access.html

我认为它对你有用,Jordi。(Saludos de Bcn)

于 2013-09-09T07:35:32.457 回答