Modify to development mode
Follow these steps:
-
Copy the production database settings to the development section of the config/database.yml file. If you prefer, you can also populate a new database.
-
Stop the Apache server:
$ sudo /opt/bitnami/ctlscript.sh stop apache
-
Checkout the latest Gemfile and Gemfile.lock files and install the required gems:
$ cd /opt/bitnami/apps/discourse/htdocs $ git checkout Gemfile* $ sudo bundle install --without test sqlite
-
Clean assets
$ ruby bin/rake assets:clean
-
Start the server in development mode. Instead of Apache with Passenger you can use the Thin server:
$ sudo rails server -p 80
The Sidekiq and Clockwork servers run in production mode by default. Change the mode in the Clockwork script at /opt/bitnami/apps/discourse/scripts/clockwork.sh, as shown below:
CLOCKWORK_START="/opt/bitnami/ruby/bin/ruby $DISCOURSE_HOME/bin/clockworkd start --clock=$DISCOURSE_HOME/config/clock.rb --log --pid-dir=$CLOCKWORK_PIDDIR --log-dir=$CLOCKWORK_PIDDIR RAILS_ENV=production"
Similarly, change the mode in the Sidekiq script at /opt/bitnami/apps/discourse/scripts/sidekiq.sh:
SIDEKIQ_START="/opt/bitnami/ruby/bin/ruby $DISCOURSE_HOME/bin/sidekiq -P $SIDEKIQ_PIDFILE -e production -L