chrisvel / wreeto_official

Wreeto is an open source note-taking, knowledge management and wiki system.
https://wreeto.com
GNU Affero General Public License v3.0
387 stars 13 forks source link

.env file #27

Closed AbramsM1A2 closed 4 years ago

AbramsM1A2 commented 4 years ago

When following the documentation the .env file where you put your ip instead of localhost is not working. When i launch bundle exex rails s always uses localhost. My goal is running this app on my ip so i can use it with any device, but i dont know how to do it, since the .env file doesnt work.

Help is apreciated, thanks.

chrisvel commented 4 years ago

I'm sorry for the late reply. The IP address in the .env file will surely work If the app is installed manually and foreman is used.

If docker is going to be used, it's necessary to setup the appropriate network depending on your system and its configuration.

If you are going to start the rails server manually, you need to pass the binding IP and/or the port:

bundle exec rails s -b <ip_address> -p <port>
# For example, bundle exec rails s -b 192.168.1.2 -p 1234

Does it make sense ?

AbramsM1A2 commented 4 years ago

Oh i see..., now is working. There is a thing i dont understand in this whole process, in the .env file i specify the host name with ip 192.168.1.2 and then you call bundle exec rails s -b 192.168.1.2 , isn't it redundant?

chrisvel commented 4 years ago

Yes and no. It depends on how are you going to use the app. Starting the rails server manually overrides the .env vars and I guess that's not going to be used by the majority of people except from those who want to experiment on a development level.