Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save miguelemosreverte/782182f1b2c45e99223b0b19928b5c0b to your computer and use it in GitHub Desktop.
Save miguelemosreverte/782182f1b2c45e99223b0b19928b5c0b to your computer and use it in GitHub Desktop.
Error:
sagas/index.js tries to connect to the Express server by calling localhost:3000
This works as long as the server is running on the same machine.
Hypothesis:
Calling IP_SERVER:3000 instead would solve the problem
Shallow Solution:
Hardcode the server public IP to the code, build a Docker Image, push and create a Kubernetes app
True Solution:
Pass server public IP as an enviroment variable to the Dockerfile.
On the code, use the enviroment variable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment