Discourse developement environment setup

Hii

I have installed discourse for development using docker .

Followed this: Beginners Guide to Install Discourse for Development using Docker

So now i want to start making some changes in functionality/code.
Here what i exactly looking for is how to setup the code now and how debug the code and
i want to see those changes reflecting in localhost:4200.

I am unable to understand how to move forward.

Do i still need to setup and install any other services/dependencies ??

Please guide me.

yes, but you almost certainly want to do that by creating a plugin (the alternative is that you want to submit changes to Discourse core). See Beginner’s Guide to Creating Discourse Plugins Part 1: Creating a basic plugin. And also I recommend that you start with GitHub - discourse/discourse-plugin-skeleton: Template for Discourse plugins.

But if you see Discourse in your browser, then you can add that skeleton plugin and start making changes there. The other place to look (once you sort of knojw what you’re doing) is discourse/instance.rb at main · discourse/discourse · GitHub

2 Likes

Thanks @pfaffman for your reply.

I use vscode. It turns out that it is at least as hard to configure to do what you want as Emacs is. I think that there is a topic about configuring vscode, that might be helpful. I have finally gotten it mostly set up so that it’ll catch most linting problems if I’ll pay attention to them.

Discourse is written in Ember, so you’ll want to use that.

You shouldn’t need to install anything else, that’s what the docker does. If you can see Discourse at localhost:4200, then you’re all set. You can make changes to the plugin and reload the page and see what happened (for some things you don’t need to reload the page).

If whatever you want to do has to do only with what is displayed, you can use a theme component rather than a plugin. In that case, you don’t even need a development environment.

You first step is probably to work through the plugin and/or theme development guides. Also, if you say exactly what you want to do, then you might get help (like “that’s already implemented”, “see XXX plugin”, or some pointers on how to proceed).

1 Like