Closed foxundermoon closed 6 years ago
or how to get the node ip inside container?
You can use service links, this enable the following environment variables inside ui containers: (assuming your exposed port is 6800)
ui: image: 'ui' ports: - target: 6801 published: 6801 protocol: tcp mode: host environment: - 'SERVER=http://backend-service:6800' - HOST=0.0.0.0 deploy: mode: global links: - backend-service:backend
more info: https://docs.docker.com/docker-cloud/apps/service-links/#service-link-environment-variables
You can use network strategy too: https://docs.docker.com/engine/swarm/networking/
display Ignoring unsupported options: links
when i deploy
i am use global mode to deploy my service. the
backend-service
is backed rest service, theui
is frontend web manager for per service. how to link theui
tobackend