![]() log for potential troubleshooting, results something like this (see highlighted rows): This change, as well as additionalĬonsole. Sounds like we found ourselves the way to pass server’s container name to the client. It’s also not hard to read them from Node.js app. Parametrize client’s ‘connect’ addressĬontainers, Docker and docker-compose provide simple way to define environmental variables. If only we had a tool (*cough* docker-compose) that can easily assign names to containers, while attaching them to user-defined network. That would’ve been a problem, if containers couldn’t talk to each other using their names instead of IPs. But they need to be connected to user-defined network first. But in order to pass it as a parameter to the client I need to know it in advance. When server app starts in a container, it’ll have a dynamic IP address assigned to it.Client and server Docker images won’t create themselves, so we need two Dockerfiles for that. ![]() Tcp : //*:3000 ), client’s ‘connect’ address still has to be parametrized. Even if I decide to keep using port 3000 and make server app to listen at all network interfaces ( The first obvious problem is hardcoded IP address.Not exactly a rocket science. Here’s what I think needs to be done: The server sends “Ping” message every two seconds and the client happily receives it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |