Currently I have successfully built the Discourse on local computer and I can open it by localhost:3000. It is so great including creating the topic, post something, etc.
Mainly I was following from here. It is really awesome!
However, I cannot open by my internal IP (i.e., local area network IP). For example, 10.1.2.139. (something like this kind of IP) I wanna open this forum on different devices. (i.e., access it on my laptop.)
Thanks for your reply!!
I have using ctrl+c to stop the process on terminal, and start by bundle exec rails server --binding=0.0.0.0 this command, but it seems still not work.
I wonder how to correctly stop it then launch again? Because I found even I already closed the terminal that I am still able to access the forum. Moreover, I was not building via docker container so that I have no launcher to use ./launcher stop app this command. Also, I have tried this kill $(cat tmp/pids/server.pid) but it replied cat: tmp/pids/server.pid No such file or directory
I will be grateful for any hint you can provide.
Are you sure about this? I have been caught out before because my browser had cached the discourse application and allowed me to browse between topics even though the server process wasn’t running. You might want to test using curl instead:
curl http://localhost:3000
You could also check to see if any ruby processes are running:
ps -ef | grep ruby
The netstat tool can tell you which processes are listening on which ports. For example, if I run a trivial python web server like this:
$ python3 -m http.server 8099
Serving HTTP on 0.0.0.0 port 8099 (http://0.0.0.0:8099/) ...
Then run netstat:
$ netstat -tlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8099 0.0.0.0:* LISTEN 2511478/python3
...
That tells me PID 2511478 is listening on port 8099 on all interfaces (0.0.0.0 means “all interfaces”). To get a bit more information about that process:
$ ps -fp 2511478
UID PID PPID C STIME TTY TIME CMD
simon 2511478 1250783 0 09:53 pts/11 00:00:00 python3 -m http.server 8099
Thanks for your information! It is quite useful. In addition, I already moved to docker-container this way.
I will try more on discourse. I am really excited about it.