modified Hemingway Read and write Windows Vista partition from ubuntu edgy eft This is the configuration of capistrano to deploy an application on Site5
when we have the code in a repository subversion. Possibly be used in other shared servers with slight modifications. To write this post I have made a real deployment of an application, I have consulted the tutorial I found on http://www.thebitguru.com/articles/9-Setting+up+Capistrano+on+Site5 and I used the media
technicians
Site5 who helped me during the process with a permissions issue that was on the server.
(this point is specific Site5
) request that you change the default shell to bash jailshell.
Set the development environment: from a subdirectory of your application rails run cap - apply-to. This command will APP_NAME
: config exists
display the URL of the subversion repository:
set: repository, "svn + ssh: / / USER @ DOMAIN / RUTA_DEL_REPOSITORIO"
Put the addresses of each role in your application (web, app, db) . Typically only used: web and: app by putting the domain name (eg "bee.com.es").
Uncomment the line "deploy_set" indicating the correct path to the subdirectory on the server where you want to install the application, eg set: deploy_to, "/ home / TU_USERNAME / apps / # {application}"
If
the username the server is different from that of the machine from which you will use capistrano, uncomment the line "user" and put your username:
set: user, "TU_USERNAME"
Add the following capistrano tasks to bottom:
desc "Link in the production database.yml and fix permissions" task
: after_update_code do run "find # {release_path} / public -Type d-exec chmod 0755 {} \\ \\; "
run" find # {release_path} / public-type f-exec chmod 0644 {} \\ \\; "
run" chmod 0755 # {release_path} / public / dispatch. * "
run" chmod 755 # {current_path} / public / dispatch.fcgi "
run" touch # {current_path} / public / dispatch. fcgi " end
Configure the server: Run from the root of the application setup command
- cap line Change public / .htaccess: RewriteRule
Dispatch.cgi ^(.*)$ [QSA, L]
by:
RewriteRule ^(.*)$ dispatch.fcgi [QSA, L] Note that
only change the extension. Cgi by. Fcgi
Ready! now to deploy your application just run from the root of the application cap deploy command
- Possible errors:
If the protocol in your subversion repository is svn + ssh, ie you have to use ssh ask you to make perimiter ssh from the server because by default it is disabled.