문제

I want to deploy a Magento application with Capistrano 3. Magento has a lib folder in the project root, so I don't think I should install Capistrano from the Magento project folder. I created a public folder. Now my project directory looks like this:

config/
lib/
public/
.git
.gitignore
Capfile

As you can see the Capistrano configuration, tasks and the project code are in 1 Git repository. I don't know if this is the way to go.

If I deploy this, it will also deploy the Capistrano files and folders which is not what I want.

Should I create my Git repository in the public folder? Or should I move the contents from the public folder up one level?

I've been searching the internet for a while now but I cannot find anything about this.

도움이 되었습니까?

해결책

If you want to track capistrano deploy script in github but don't wish to upload it to production server, I would suggest that you separate out the capistrano into a separate project. Othwerwise, I don't think it can be helped that capistrano code is deployed to production server.

If you really don't want the capistrano script to be there, then I would suggest that you create an additional task that simply deletes the capistrano folder on production.

다른 팁

In .gitignore file, you can enter the paths of the files which are not necessary for uploading. Which I mean is, suppose if you enter the /lib in the .gitignore file then those files will be ignored while creating a package to deploy from git. So enter the paths of the files which are not required. Go through this article http://git-scm.com/docs/gitignore

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top