Stupid // set up issue

(Patrick Burrows) #1

This is a stupid question, but I am having problems finding the answer. I’ve dug through all the settings screens and nothing is apparent to me.

I am setting up a new instance of discourse, and discourse keeps thinking the url of the site is Where do I change this?

For instance, if I upload a picture, the URL of the picture is something like:

Obviously there is somewhere to set this. I am just not finding it.

Again, sorry for the stupid question.

(Régis Hanol) #2

Are you using our recommended docker setup? If so, then you should change the DISCOURSE_HOSTNAME in the containers/app.yml file and restart your container.

(Patrick Burrows) #3

Oh. Man, I hate having to dig through the linux / docker stuff. I’ll go and try and figure out what path all that is at.

(Patrick Burrows) #4

Found the location (/var/discourse/containers/app.yml for future reference)

(Jeff Atwood) #5

Are you not following our official install guide? Because this is covered there

(Patrick Burrows) #6

I followed it. I, apparently, missed a step. I am deeply ashamed.

(though, the relevant part is deeper in the document you quoted).

Also, I used Azure.

Using Azure to host a docker based Discourse instance
(Jeff Atwood) #7

OK, based on your experience, how do you think we could make the install guide clearer on this point?

(Patrick Burrows) #8

I’d have to go back and look, but if I remember correctly there was a lot of distance to travel in the app.yml file on a tiny PuTTY terminal window. On a normal sized editor it would have been fine. But I seem to remember there being a lot of scrolling to get to the relevant sections in the app.yml file.

If there was a way to group the sections that need to be configured closer together in that file that would be helpful.

Also, perhaps a warning in the admin area of the discourse setup, “Hey you are using ‘’ as the site domain – this is almost definitely wrong. You should go change this in the app.yml file.”

I didn’t really notice I hadn’t changed this correctly until some of the test posts I created suddenly had broken image links the next morning when I looked at them. And by then I was out of the “setup” mindset and into the “configuration” mindset, having already forgotten all the setup steps.

(Jeff Atwood) #9

I think that’s the easiest and best outcome. @riking can you add a clause to our install script that tests for “domain left at default” and cancel? We do something similar when the email host is left at default values (which can’t possibly be correct), so you can probably copypasta that code to make it work.

(Kane York) #10

Sure: Abort if domain is not configured by riking · Pull Request #172 · discourse/discourse_docker · GitHub

(Patrick Burrows) #11

So I’m still having this issue and am not sure what is causing it.

I just verified that my app.yml is, indeed, pointing at the domain name for the site (just a temp domain name):

Yet whenever I upload images, the are getting the domain name of // attached to them. See this post I just created for an example:

Is there something else I need to do to make the images not be //

(Jeff Atwood) #12

Did you rebuild the container after changing that app.yml setting?

(Patrick Burrows) #13

I did a restart and a rebuild. And nothing changed.

One thing I didn’t do which I saw you had posted here was to do a discourse remap, and then posts:rebake.

Before I noticed that post, I decided to change the domain name to the ultimate domain name I wanted (since it took so long), and am running another rebuild because of it.

So the rebuild is still running (takes forever!). When it is done I will try the remap and rebake and see if that fixes it.

(Jeff Atwood) #14

Rebake will only affect old posts with the old domain name in them. If you changed the site name in app.yml and successfully rebuilt the container new posts / uploads should never contain the old domain name.