Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top