Is there an easy way to change version during development?

Hi !

I’m developping a Discourse plugin for internal purposes, and also try to contribute to the core.
The stable version of the plugin uses a stable version of discourse, so I have to constantly switch the code base:

  • use the main branch when contributing to the core
  • use the version used in our production env when patching bugs for the plugin
  • use the latest version when adding features to the plugin

Every time, I have to destroy the dev container (d/shutdown_dev), delete data and tmp, checkout the right Discourse version, then rebuild and relaunch the container (d/boot_dev --init), configure the first user, then apply our configuration (via a kind of automated restore script), potentially many times a day.

Is there a way to make this less painful ?

Ideally, i’d like to :

  • be able to configure the dev container not to start automatically
  • be able to have many dev containers that I can start/stop whenever I want.

d/boot_dev --help displays the --env/--env-files arguments but I could not find anything about what I can configure with it

Do you have the same kind of issues ? How do you manage to solve it ?

1 Like

One way to do this is to have multiple containers, one for stable, one for main.

Another option is Using dv (Discourse Vibe) to configure Discourse AI in development

You don’t have to use any of the AI features of dv, if you don’t want to (though they can be handy, of course). But at core, dv lets you spin up multiple containers very quickly. So you could run two containers side-by-side (or more), one for each version/branch.

2 Likes

Thanks, I’ll look into it.