I'm trying to run discourse app locally in production env without docker

AI-generated summary

The original poster, Abdul_Hanan, is trying to run the Discourse app locally in a production environment without using Docker, but is encountering an error. merefield and rishabh clarify that running a production environment locally and without Docker is not supported.

For production, rishabh points to the supported install documentation, and merefield notes that seeking support for alternative setups may require payment.

merefield also shares a project for running Discourse on a Raspberry Pi using Docker, which may be replicable on WSL2.

After setting up using Docker, Abdul_Hanan needs to make changes to the Rails code for the production environment. merefield suggests building a plugin or creating a theme component, depending on the type of changes required.

Getting an error while running app in locally in production env.
dev/discourse/lib/discourse.rb:551:in
`current_hostname’: uninitialized constant Discourse::SiteSetting (NameError)

Did you mean? Discourse::SiteSettingMissing

from /Users/dev/discourse/config/initializers/100-verify_config.rb:7:in `’

Welcome to Meta.

Normally you’d run a development install locally:

https://meta.discourse.org/tags/intersection/how-to/dev-install

Running Production locally and without docker is not supported.

Thanks for your quick response.

So for production we need to go with docker ?

you can do what you feel like, but getting support for other setups is going to be tricky unless you want to pay someone :slight_smile:

There’s a fun project here using a cloudfare tunnel for running Discourse locally on a raspberry pi, which you might be able to replicate on WSL2 … but both in Docker.

Our supported install for production is documented here: discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub.

For development, use Topics tagged how-to & dev-install as Robert said.

@rishabh thanks for your response.

I see, I’ve setup using docker but, I need to make some changes into rails code so how I can do this for production env?

Build a plugin.

Or if changes are just front end, a theme component.

Got it, Thanks