IRC logs for #farmOS, 2023-07-21 (GMT)

2023-07-20
2023-07-22
TimeNickMessage
[13:23:33]* mstenta has joined #farmos
[15:20:04]<firgoodway[m]>I'm probably missing something simple here... I attempted to do a dev deployment (`docker-compose.development.yml`), ran `docker-compose up -d`, but can't get past the initial setup screen in the browser. I get error message:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/fa8eee4f28...)
[15:28:11]<mstenta[m]>Hi firgoodway - you need to replace the default `localhost` address of the database with `db` under the "Advanced" settings
[15:28:51]<mstenta[m]>From the perspective of the farmOS docker container, the database is on another host (db within the Docker network), not on localhost (which would be the same host as farmOS)
[15:29:11]<mstenta[m]>If that makes any sense :-)
[15:30:45]<firgoodway[m]>it does! I figured it was something like that. So, would a solution be to enter "host" as that machine's IP address? or am I still barking up the wrong tree?
[15:31:40]<firgoodway[m]>...oh yep that did the trick :)
[15:32:30]<mstenta[m]>Oh you should just be able to put db as the address
[15:32:47]<mstenta[m]>Internally, Docker sets up the db and www hostnames so that the containers can communicate with one another
[15:32:53]<mstenta[m]>I don't know what host does
[15:33:30]<mstenta[m]>Notice how there are two "services": https://github.com/farmOS/farmOS/blob/2.x/docker/docker-compose.developm...
[15:33:33]<mstenta[m]>db and www
[15:33:37]<firgoodway[m]>oh interesting... dev for 15+ years and still a total docker newb
[15:34:08]<mstenta[m]>those become the hostnames of the containers within their docker network, so that's how they talk to one another (so the www can connect to the database by making a request to db)
[15:34:19]<mstenta[m]>haha yea no worries, Docker has it's own ins and outs :-)
[15:34:34]<mstenta[m]>once it clicks it all makes sense
[15:37:52]<firgoodway[m]>thanks for the quick help, you guys are great
[15:50:48]<symbioquine[m]><firgoodway[m]> "it does! I figured it was..." <- The only downside of that is that it implies you're exposing the db container to the rest of your network - when in this case it only needs to be exposed to the farmOS (www) docker container.
[15:51:35]<symbioquine[m]>You could work around that with firewall rules or something, but from a security in layers perspective it would be better to have one of the first lines of defense be not exposing it in the first place.
[16:59:38]* mstenta has quit (Ping timeout: 258 seconds)
[19:14:07]* mstenta has joined #farmos
[19:19:31]* mstenta has quit (Ping timeout: 250 seconds)
[19:32:23]* mstenta has joined #farmos
[19:38:55]* mstenta has quit (Quit: Leaving)