Last active
December 28, 2015 21:19
-
-
Save taichiman/7563844 to your computer and use it in GitHub Desktop.
Deploy: rails+rvm+unicorn+nginx
for staging and production space
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, add Unicorn to your app’s Gemfile: | |
gem 'unicorn' | |
a.Run bundle install to set up your bundle locally. | |
b. Create a configuration file for Unicorn at config/unicorn.rb | |
c. Create pid and shared paths on server | |
=== | |
Check concurrency paths in nginx.conf and unicorn.rb | |
*be attention with /current and shared/ path. | |
=== | |
(Note: | |
0. Use bundle install | |
1. Need db migrate in the environment. | |
rake db:migrate RAILS_ENV=production | |
2. Assets precompile. | |
) | |
=== | |
Start Unicorn. It create its files. Select right Environment. | |
bundle exec unicorn -E production -c config/unicorn.rb | |
or mybe unicorn_rails -c /var/www/unicorn/config/unicorn.rb -D | |
Flow: | |
https://github.com/capistrano/capistrano/wiki/2.x-from-the-beginning | |
--- | |
1. Куда класть базы , в shared естественно | |
2. Assets тоже ддолжны быть в shared | |
3. Как быть с mysql сервером ? | |
4. set :deploy_via, :remote_cache ?? | |
Перед deploy: | |
1)set :rvm_ruby_string, :local какой выбрать gemset | |
2) сменить admin на www | |
3)Антону: надо сделать rvm autolibs | |
4) Изменить пути в unicorn rb для stage | |
Перед Depoy new: | |
1) Можно ли в одном месте вводить путь деплоя deploy_to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment