docker-compose


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!

Related Links

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

Categories

HOME
spring-boot
stanford-nlp
grpc
file-upload
readdir
coordinates
mailchimp
autocad
guidewire
google-closure-compiler
dat.gui
greensock
game-engine
google-street-view
project-structure
connectiq
pumping-lemma
ckeditor4.x
android-6.0-marshmallow
restangular
osgi-bundle
ds-5
arp
foxpro
traitsui
offset
wit-ai
sampling
kdevelop
outlook-2010
queryover
pygraphviz
word-wrap
keychain
qt-quick
peerjs
f#-fake
line-endings
denodo
spring-cloud-bus
noise
cancan
perldoc
fluent-nhibernate-mapping
aws-rds
liferay-ide
trusted-computing
disassembly
huawei
addressbook
mac-app-store
syslog4j
sprockets
php-java-bridge
treelist
oryx
markerspiderfier
nonblocking
tvp
winforms-interop
playn
glog
waterline
minko
service-broker
google-experiments
grunt-contrib-connect
conditional-comments
clearcanvas
zoneminder
behance-api
traceur
html5-filesystem
lastinsertid
grunt-contrib-imagemin
google-oauth-java-client
generator-expression
brew
auctex
system.transactions
yii-components
orchestration
ios6-maps
jmesa
code-organization
clgeocoder
httppostedfilebase
windows-xp-embedded
excellibrary
arraycollection
dongle
uccapi
software-update

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App