Bootstraping DigitalOcean server with nginx, and working rails application
Where to start?
Create account on DigitalOcean through link. (Using it you appreciate our efforts into releasing this tutorial with vpsb gem)
- start by installing our gem
gem install vpsb
- then run gem by
vpsb i <directory_name_to_create> # f.e. vpsb i my_first_app
cd <directory_name_to_create> # cd my_first_app
vpsb g
In the last step you will be asked for several questions to provide base configuration
At the end you will have working rails app.
ALTERNATIVELY, you may want to build server manually. If so, then
create DigitalOcean droplet manually (https://cloud.digitalocean.com/droplets/new)
clone server app repo from github
git clone https://github.com/pniemczyk/bootstrap_server_app_in_do.git
- install all dependencies by script
./init_env.sh #installs all gems and downloads all coookbooks
update configuration (read README to know the meaning of files in repo)
run bootstrap script
./bootstrap.sh
clone our sample rails app
git clone https://github.com/pniemczyk/bootstrap_rails_app_in_do.git
run
bundle install
reconfigure app (enter domain in production deploy files)
run
cap production deploy
Contributing
- Fork it ( https://github.com/[my-github-username]/vpsb/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request