I’m trying to debug a plugin that works locally but doesn’t in production. I want to run Discourse locally in production but I’m having some issues and I don’t want to keep digging if this is not the right way.
What I’m doing right now that works is
- Copy database configuration for development to production in the
config/database.ymlfile - Remove the
database_configurationmethod override inapplication.rb - Remove the check for puma configuration to be used in production in
config/puma.rb - Set
config.public_file_server.enabled = trueinconfig/environments/production.rb - Compile assets with
env RAILS_ENV=production bundle exec rake assets:precompile - Run the server with
env RAILS_ENV=production bundle exec rails s
Is there an easier way to do this?
Thanks!