Merge pull request #450 from gopesht/dj_deploy

Adds delayed jobs recipe for production, and some documentation
This commit is contained in:
Artem Chernikov 2014-08-19 09:50:36 +02:00
commit 65291d8b0d
2 changed files with 12 additions and 1 deletions

View file

@ -60,6 +60,12 @@ myprovider_secret = 'sample data'
That is required so that the check in app/views/devise/shared/_openid.html.haml will pass and
the image-link to login using the provider will be shown.
11. Open a separate terminal and go into the directory where the rails app is present, and type the following to start the delayed_jobs worker for sending email notifications.
```
rake jobs:work
```
### Run OSEM in production
We recommend to run OSEM in production with [mod_passenger](https://www.phusionpassenger.com/download/#open_source)
and the [apache web-server](https://www.apache.org/). There are tons of guides on how to deploy rails apps on various

View file

@ -28,6 +28,10 @@ end
desc 'Deploys the current version to the server.'
task deploy: :environment do
to :prepare do
queue "cd #{deploy_to}/current && RAILS_ENV=production script/delayed_job stop"
end
deploy do
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
@ -38,8 +42,9 @@ task deploy: :environment do
to :launch do
queue "sudo /etc/init.d/apache2 restart"
queue "cd #{deploy_to}/current && RAILS_ENV=production script/delayed_job start"
end
invoke :'deploy:cleanup'
end
end