Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.3 KB

running.md

File metadata and controls

19 lines (13 loc) · 1.3 KB

Running the nbgallery application

You can run nbgallery with the built-in rails server command or with Rack servers like Puma or Passenger.

Startup sequence

  1. Make sure MySQL/MariaDB is up and running.
  2. bundle exec rake db:migrate must be run whenever there are database schema changes, but it's safe to run it every time.
  3. If running in production mode: bundle exec rake assets:precompile
  4. If running the bundled Solr server: bundle exec rake sunspot:solr:start (in development mode, this happens automatically)
  5. Start the app: e.g. rails server or via a Rack server like Puma, Passenger, etc.
  6. If you need to run scheduled jobs outside the app (e.g. if you're using Passenger), start cronic in daemon mode: bundle exec script/cronic -d -l <logdir>/cronic.log -P <piddir>/cronic.pid

Shutdown sequence

  1. If running scheduled jobs outside the app, stop the cronic daemon: bundle exec script/cronic -k -P <piddir>/cronic.pid
  2. Stop the rails app server
  3. If running the bundled Solr server: bundle exec rake sunspot:solr:stop (in development mode, this happens automatically)