docker-compose v3 services on several networks
I use docker-compose v3 file to deploy services on docker swarm mode cluster. My services are elasticsearch and kibana. I want that kibana was accessible from outside, and that elasticsearch could be accessed by kibana and was not visible and accessible from outside. In order to reach this kind of behavior, I created 2 overlay networks called 'external' and 'elk_only'. I put elasticseach on 'elk_only' network and I placed kibana under 'elk_only' and 'external' networks. And the things do not work. When I go to localhost:5601 (kibana's port), I get a message: 'localhost refused to connect'. The command I use to deploy services is docker stack deploy --compose-file=elastic-compose.yml elkstack The content of elastic-compose.yml file: version: "3" services: elasticsearch: image: elasticsearch:5.1 expose: - 9200 networks: - elk_only deploy: restart_policy: condition: on-failure kibana: image: kibana:5.1 ports: - 5601:5601 volumes: - ./kibana/kibana.yml:/etc/kibana/kibana.yml depends_on: - elasticsearch networks: - external - elk_only deploy: restart_policy: condition: on-failure networks: elk_only: driver: overlay external: driver: overlay The content of kibana.yml is server.port: 5601 server.host: "0.0.0.0" elasticsearch.url: "http://elkstack_elasticsearch:9200" Could you help me to solve this problem and understand what's going wrong? Any help would be appreciated!
docker-compose service listen on specified interface
Does Docker-Compose allow overwriting of ports when using extends?
Jhipster Docker-compose conflict
Build multiple images with Docker Compose?
JHipster Cassandra Docker Build
Defining project name inside docker-compose configuration
Docker-compose named mounted volume
cannot ping linked docker container service
How to do variable substitution in env_file?
How to create stack in tutum with docker-compose.yml file?
ecs-cli docker compose version
dynamic link update in docker-compose
How to start arbitrarily many identical containers with docker-compose?
How to stop docker-compose run command
Unable to run sensu check in a docker-compose context
Should I use docker-compose start or docker-compose up -d