Skip to content

Instantly share code, notes, and snippets.

@sdomino
Last active January 16, 2019 08:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sdomino/0eeb5dc84dd25fa9d66027324128377e to your computer and use it in GitHub Desktop.
Save sdomino/0eeb5dc84dd25fa9d66027324128377e to your computer and use it in GitHub Desktop.
An example boxfile.yml, configured to run Discourse with Nanobox (nanboox.io)
run.config:
engine: ruby
extra_packages:
- git
- nodejs
- nginx
- ImageMagick
- optipng
- jpegoptim
- gifsicle
- jhead
extra_steps:
- yarn install
extra_path_dirs:
- node_modules/.bin
cache_dirs:
- .bundle
- vendor/bundle
- node_modules
#
deploy.config:
before_live:
web.main:
# - bundle exec rake db:setup_or_migrate
- mkdir -p tmp/ember-rails
- touch tmp/ember-rails/ember.js
- touch tmp/ember-rails/ember-data.js
- chmod +w tmp/ember-rails/*
- bundle exec rake db:migrate RAILS_ENV=production
- bundle exec rake assets:precompile --trace RAILS_ENV=production PRECOMPILE=true
#
web.main:
start:
nginx: nginx -c /app/config/nginx.conf
puma: bundle exec puma -C /app/config/puma.rb
writable_dirs:
- log
- plugins
- public
network_dirs:
data.assets:
- public/assets
- tmp
log_watch:
rails[discourse]: log/production.log
puma: log/puma.log
#
worker.main:
start: bundle exec sidekiq
writable_dirs:
- log
- public
network_dirs:
data.assets:
- tmp
log_watch:
sidekiq: log/sidekiq.log
#
data.db:
image: nanobox/postgresql:9.4
#
data.assets:
image: nanobox/unfs
#
data.redis:
image: nanobox/redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment