Where is the discourse.conf file?

Where do you normally find the discourse.conf file?

I am simply not familiar with the usual location for discourse as I tend to leave everything alone as it all usually works perfectly - thanks for any advice in advance!

Extra background info on this query

it should be in your discourse/config/ directory:

1 Like

Thanks. I saw that location but I have to enter the app right?

No nano when I’m in the app. How do I edit something in there?

Just to add, when in the app I can see this and I think this is what I need to modify, but again while in the app I hear no nano, so I am unsure how to edit, maybe install nano?

…app:/etc/nginx/conf.d# discourse.conf

Further to that, I assume if I can do that (install nano and edit .conf) then I should expect during any upgrade it will be overwritten?

I see mention the possible use of replace commands in app.yml file NGinx.conf File location to compensate this but I suspect maybe I am comprehending things incorrectly and that is a very old topic where the link to the examples are not working. So may be irrelevant.

you should be able to do this?

cd /var/www/discourse/config/
sudo nano discourse.conf

Right so no such file or directory exists. (I’m not in the app)

You may use apt install to install nano within the container.

Furthermore, if your intention is to modify the Nginx configuration file, it is recommended to make the modifications in app.yml outside the container.

2 Likes

Ok as suspected above.

How do you format them for the app.yml, is there a guide on meta?

Here is what I need to include:

ssl_certificate /etc/ssl/certs/cloudflare_origin.pem;
ssl_certificate_key /etc/ssl/private/cloudflare_origin.key;

advanced search works well. searching for “app.yml” in the Documentation category yielded

It is inside the container.

What do you want to do? It’s generally configured by setting env variables in the app.yml.

What problem are you trying to solve?

2 Likes

Thanks.

The problem I thought I had to solve I thought was caused by SSL issue with CF moving from flexible to Full of Full-Strict after proxing through CF (historically grey cloud).

It wasn’t that problem in the end, there was a legacy page rule that was causing super redirect loop, which is suggested can be caused by incorrect SSL setup in CF as per the guide on meta, but in this case it was the pesky page rule.

Very easy fix that one, but a bit slow to figure out! :sweat_smile:

However to the ancillary issue.

I assume that when placing the keys, certs it’s all done in the container side for CF Full [strict] the cert and key need to be placed container side. The .conf type mods in the app.yml in.

This is my own lack of technical orientation. Dockers or the continuer is like a kinder egg right? Linux the chocolate egg and docker is the cool toy (already assembled) inside.

Finally, the discourse install had letsencrypt and FULL appears to be working fine with this and HTTPS works and this is now allowing traffic mitigation actions.