What are the benefits of a dev environment?

I’m trying to understand: what is the advantage of the development environment? I see a few topics where people got things working in dev which later didn’t work in the standard docker environment.

Why does one not just use the production containers when developing and then everything works as expected in the production environment?

Dev environments are particularly useful for developing for core itself or plugins:

  • deploying changes quickly without having to fully rebuild assets every time
  • debugging
    • use tools like pry or byebug (or even puts!)
    • logs level
  • lack of need for a domain or certificate
  • no internet access required most of the time (working on a train or somewhere with slow internet access?).
  • working with unminified javascript is much more pleasant and more efficient & productive.

NB there is a docker dev install you can leverage, so working in dev does not mean not leveraging docker. (I actually created my own hybrid dev environment using docker compose in the cloud).

if you are developing Themes or Theme Components, development can work really well on a Production environment using Install the Discourse Theme CLI console app to help you build themes if you use a Theme which is not exposed to general users.

8 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.