Which IP should I point in `containers/app.yml` for installing on a local host?

AI-generated summary

A user (diff) seeks guidance on configuring DISCOURSE_HOSTNAME in containers/app.yml for a local Docker installation of Discourse, specifically asking if 127.0.0.1 is the correct IP. Qasem_h confirms that 127.0.0.1 or localhost are valid options and suggests reading the official Discourse blog post on running it as a Rails app. codinghorror clarifies that the specific value matters less than consistency, noting that the local hosts file can be edited to map any desired hostname to the container as long as it matches the app.yml entry. When diff expresses confusion about editing the hosts file in a Docker environment compared to a traditional Apache setup, ark provides the specific file paths: /etc/hosts for Linux and c:\windows\system32\drivers\etc\hosts for Windows. Qasem_h further advises that Apache is unnecessary for this setup and suggests Nginx if a web server is required. Finally, riking explains the purpose of the configuration option: it defines the domain prefix Discourse uses when generating URLs, such as meta.discourse.org.

I’m going to install Discourse on my machine to test and customize it.
I want it to be installed on my machine and run from it. I don’t need it be on the internet somewhere.
Now, I’m confused in this step:

When it asks for DISCOURSE_HOSTNAME, What should I put there? What’s the ip pointed to docker container? Is it 127.0.0.1?

127.0.0.1 or localhost
read this :

It does not matter as you can always access the site via IP. You could edit your local hosts file to make it whatever you want as long as it matches what was entered in the app.yml.

This is my problem! If it was a php based, I knew how to edit apache, But here I don’t know what is docker and how I should edit local hosts file. Where is local hosts file?!

I think you don’t need apache , you can uninstall it
if you want web server install nginx web server

/etc/hosts

c:\windows\system32\drivers\etc\hosts

The configuration option is asking this question:

When Discourse generates a URL, what should it put in front?

Example answer: meta.discourse.org