Share your Discourse dev setup

I will start with my own setup on macOS.

I don’t use docker for speed reasons and also because I enjoy having fewer indirections levels as much as possible.

  • redis is installed with homebrew
  • I use postgress.app for the database ( easy start/stop and version selection) If you need a very good gui on macOS I recommend postico
  • mailcatcher gem for mails
  • puma-dev for subfomains/domains/https/tlds… handling ( note it works with unicorn just fine)
  • ngrok for when I need to test some things on another device easily
  • my editor is configured to work with eslint/prettier/rubocop
  • I have my own discourse fork, I will rebase from discourse/discourse master each time I start working/pushing and create a branch for each chunk of work

I have various scripts and alias to start/stop/reser/swap dbs and thats most of it.

If you have questions on specific parts of this setup, feel free to ask.

11 Likes

Since I don’t do much development, I use a simple sandbox hosted on a small VM on my home server.
It’s a straightforward 30 Mins Docker install with one exception: emails are globally disabled due to obvious reasons.

The purpose to host it is to stage any changes before deploying them to any of the production sites.

4 Likes

I wrote a bit about my setup here:

But I possibly should update it again. I am mostly in i3wm these days so I don’t really use mobaxterm etc.

6 Likes

Like Bhanu I don’t do development often, but I do have a full dev setup for those rare occasions where it’s necessary. My primary OS is Windows 10, so I have Ubuntu running within a VMWare VM for my development tasks. While I considered setting up within Windows, I like the separation that a VM gives me - work is in the VM, everything else is not.

I then followed the Beginners Guide to Install Discourse on Ubuntu for Development to configure all the dependencies and get Discourse up and running.

5 Likes

https://github.com/JanitorTechnology/dockerfiles/tree/master/discourse

Just to expand a bit on what @notriddle said, Michael is using Janitor which is very similar to docker compose except on the cloud.

See: https://janitor.technology/ and Feedback wanted for Janitor - Discourse development in the cloud

3 Likes

OS and Discourse

My dev install is based on the official Ubuntu install guide on Ubuntu 18.04 and I’m very happy with the performance.

Editor

I use Atom with the following packages:

  1. Prettier to format code on save

  2. Atom IDE which gives me a nice outline of the files I’m working on. This also needs additional packages depending on the languages you work with. I use

  3. One dark theme because it looks nice.

Browser

I use Chrome as the main browser because I really like how solid devTools is. I did make a few changes in the settings. Here’s what my settings look like

I also have the Ember inspector installed

I have device frames enabled, which is what I use on mobile screenshots I post here.

I highlighted capture screenshot as well since it’s a very cool feature that I use to get pre-cropped screenshots of what’s in the viewport very easily.

Git Client

I also use GitKraken which gives me a very good overview of everything going on in the Discourse repository and helps me organize my work.

workflow

I also have a fork of Discourse. My workflow for any change is as follows:

  1. pull latest from Discourse
  2. create a branch
  3. make changes and test them on a few devices (see note below)
  4. commit changes
  5. rebase
  6. send a PR to Discourse master
  7. once merged, I deleted the branch.

Note: in order to test changes on different devices, I keep the Discourse server running on localhost on Ubuntu, connect the other devices to the same network and I’m then able to access my dev install on any device on the network by going to <host-ip-address>:3000


A couple more things I’d like to mention and they’re not really related to developing but at the same time they’re just as important to me.

  1. I use a very comfortable mechanical keyboard and it really adds to the experience
  2. I use the Qugir dark theme for Ubuntu which I find very visually appealing.
13 Likes