Source: https://gist.github.com/ctalkington/4448153
bundle install
mkdir -p tmp/puma tmp/uploads tmp/store
bundle exec puma --config puma.rb
$ nginx -p $PWD -c nginx.conf
-p
sets the prefix path, which will be used in nginx.conf
when evaluating relative paths. See this SO article for details.
Upload a file (plain HTTP PUT):
curl -X PUT -H "Content-Type:application/octet-stream" --data-binary README.markdown "http://localhost/droplets/550b1d35946db2844bc30ed343599ca573fb9058f3d5c33d777822657c3f51b3"
gem install foreman
and then run the following command in the project's directory:
foreman start
For fast iteration, watch the nginx config and reload nginx on change:
$ fswatch nginx.conf | xargs -I {} nginx -s reload
This assumes that nginx was already running (see above).
Rerun does the reloading for Ruby files:
$ rerun -- bundle exec puma --config puma.rb
The .tmuxinator.yml
file starts all of these commands in a single tmux window.