Skip to content

Instantly share code, notes, and snippets.

@sdomino
Last active January 23, 2017 16:35
Show Gist options
  • Save sdomino/39c39a5012f0b3778e40264360f94637 to your computer and use it in GitHub Desktop.
Save sdomino/39c39a5012f0b3778e40264360f94637 to your computer and use it in GitHub Desktop.
# boxfile.yml
run.config:
engine: ruby
# add extra packages
extra_packages:
- nodejs
- nginx
#
deploy.config:
extra_steps:
- rake assets:precompile
before_live:
web.main:
- rake db:setup_or_migrate
# add a database
data.db:
image: nanobox/postgresql
# add a web component and give it a "start" command
web.main:
start:
nginx: nginx -c /app/config/nginx.conf
puma: bundle exec puma -C /app/config/puma.rb
# add writable dirs to the web component
writable_dirs:
- tmp
- log
# the path to a logfile you want streamed to the nanobox dashboard
log_watch:
rails: 'log/production.log'
# add a worker component and give it a "start" command
# worker.main:
# start: sidekiq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment