Программирование
- 0 ответов
- 0 вопросов
3
Вклад в тег
useradd -d /home/deployer -m deployer
passwd deployer
visudo
deployer ALL=(ALL) ALL
\curl -sSL https://get.rvm.io | bash -s stable
rvm requirements
rvm install 2.1.2
rvm use 2.1.2 --default
gem install rails 4.1.0 --no-document
sudo apt-get install nodejs
sudo apt-get install apache2 curl git build-essential zlibc zlib1g-dev zlib1g libcurl4-openssl-dev libssl-dev libopenssl-ruby apache2-prefork-dev libapr1-dev libaprutil1-dev libreadline6 libreadline6-dev
gem install passenger
passenger-install-apache2-module
LoadModule passenger_module /home/deployer/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/deployer/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.37
PassengerDefaultRuby /home/deployer/.rvm/gems/ruby-2.1.2/wrappers/ruby
</IfModule>
sudo a2enmod passenger
<VirtualHost *:80>
ServerName sitename.com
DocumentRoot /home/deployer/ror_apps/sitename/current/public # путь для capistrano. либо свой
<Directory /home/deployer/ror_apps/sitename/current/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
sudo a2ensite sitename
sudo service apache2 reload
bundle exec cap deploy
{
items: [
{
id: 0,
name: "Book0"
},
{
id: 1,
name: "Book1"
}
]
}
<div class="books-total">{books.totalResults}</div>