Issues running Discourse in Docker Engine with Compose file

Not sure I understand my topic title, but such is life in the cloud.

I watched your awesome video on working with Docker on the Reclaim Cloud, @timmmmyboy, so I tried installing this Bitnami instance of Discourse using the compose file. I setup a Doocker Engine environment and then ran the following two codes:

$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-discourse/master/docker-compose.yml > docker-compose.yml
$ docker-compose up -d

It downloaded and appeared to install at http://bavacourse.uk.reclaim.cloud/, but nothing:


I then tried the /admin URL and could see there that Discourse was installed, but maybe the stylesheet or URL was off?

At this point I am wondering if I messed up not setting the DISCOURSE_HOSTNAME environment variable to bavacourse.uk.reclaim.cloud. And, if so, would I do that in the compose file before loading it? Is there a way to edit this post facto? Inquiring minds want to know :slight_smile:

I think you’re exactly right. What you’re seeing is Discourse when it’s not allowed to load much of any javascript :slight_smile: If I look at source code of that blank page it’s clearly trying to load the Discourse install, which is good, the compose file worked to some extent and it’s “running” in that sense. But if I look at the Console are in Chrome Developer Tools I see references to example.com and I imagine that’s why it’s also refusing to load javascript, your browser doesn’t want to allow cross scripting type stuff and it’s not seeing the URLs properly.

One thing you could try, is to set the variable following the information in the video. And then login to your docker server and navigate to the folder for the install and run docker-compose down in then docker-compose up -d and see if it picks up the variable when rebuilding.

I’ve never used the Bitnami package, will be interesting to see if that works. Our forums were setup using the standard install method discourse/INSTALL-cloud.md at main · discourse/discourse · GitHub

I had no luck with then Bitnami install, so tried the standard install you pointed me to on Github, and went through all the steps but keep getting a this site cannot be reach.


Not sure if this is an SSL or firewall issue, but I can’t seem to fix it, even when trying with the IP address http://51.222.48.167/

I tried to install it twice just to make sure it wasn’t an issue on my end, one thing that just struck me is I put the hostname in the setup config as discourse.bavatuesdays.com (which I mapped) vs. bava-discourse.ca.reclaim.cloud, might that be causing an issue given this seems network related?

I think Cloudflare is likely conflicting with this. When I switched your hostname back at /var/discourse/containers/app.yml and ran ./launcher rebuild app it came online

I would see if you can bypass Cloudflare routing altogether or perhaps disable their SSL certificates so the app can use its own that it generates through Let’s Encrypt.

It’s worth noting here for others that while Discourse does use Docker in the background, they use it in a very different way than most other containers and rarely support just starting a docker container in the way the video linked at the top here talks about. So while Discourse is absolutely possible on Reclaim Cloud (these forums run there in fact) it’s going to stray quite a bit from standard procedures there.

Thanks for the pointer. I was heading down that hole having just uncommented the SSL requirements in the containers/app.yml file.I think you’re right on, it’s definitely an SSL issue. Did you get forums.reclaimhosting.com to work with the built in SSL while mapping the domain? How are you managing that with that Docker Engine/Discourse instance?

SSL is still something I am trying to wrap my head around in this case, thinking maybe I need a load balancer, even though it already has an external IP, just not allowing Let’s Encrypt on that, or so it seems.

Yep, these forums are using the built in Let’s Encrypt support in Discourse so no LB on top. I think Let’s Encrypt via the Discourse method should work as long as Cloudflare is not routing the traffic, it’s likely not reading the right URLs as a result of that piece. So perhaps better worded more of a Cloudflare CDN issue than a cert issue. Try changing the toggle for your DNS record to turn off the proxying https://support.cloudflare.com/hc/en-us/articles/360019093151-Managing-DNS-records-in-Cloudflare

I love you, Timmmmmmmmyboy!

You were absolutely right on all counts:

  1. Discourse’s built-in Let’s Encrypt worked
  2. needed to turn off proxy DNS in Cloudflare
  3. mapped domain worked as a result and no need for additional IP

This is done, and given I chose yet again an annoying, issue-laden application, I am going to try and write up a tutorial, and maybe even try my hand at a short video working off the tutorial script.

Thanks for your patience with me on all of this.

1 Like