awsdiscourse

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
    
  • Navigate to the Discourse installation directory:

      $ cd /opt/bitnami/discourse
    
  • 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 server runs in production mode by default. Run the command below to set the mode to development:

    $ echo "export DISCOURSE_ENV=development" | sudo tee -a /opt/bitnami/scripts/discourse-env.sh
Last modification February 9, 2023