DEV Community

[Comment from a deleted post]
Collapse
 
jdforsythe profile image
Jeremy Forsythe

You need to use a container orchestrator to run your containers. Something like Kubernetes or Docker Swarm. Any orchestrator will have a way to get variables into the environment of the container. All languages should have a way to get values from the environment (e.g. process.env in Node). Pull all your config from there and let the orchestrator handle the different environments.

The orchestrator will abstract away whether your system is running on one dev machine or 10 EC2 nodes and you just use hostnames to talk to other services.

Read about 12 Factor App and container orchestration.