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 adding nodes dynamically to nginx frontend
Docker Swarm - dependencies definition
docker-compose volume not mounted
Exposing sentry service in docker-compose file
Yesod and docker-compose logs in development mode
Docker compose to always deploy using latest image
JHipster - Doubts in the development using Microservices Architecture
Gogs + Drone getsockopt: connection refused
Concourse result keeps loading
Docker-compose: AttributeError: 'module' object has no attribute 'ssl'
scaling a service with docker compose
Docker Compose apparently ignores COMPOSE_FILE
Where does Docker install gems on a mac
What is the difference between docker-machine and docker-compose?
Docker Compose port issue. Cannot launch docker project on localhost
Name an image built from running a docker-compose file

Categories

HOME
c#
spring-boot
url
locale
glsl
livecharts
esxi
thermal-printer
flowtype
procmon
symfony-3.2
clip-path
wowza
cakephp-2.0
openscad
ofbiz
md2
project-reactor
audio-streaming
glibc
ajaxcontroltoolkit
lotusscript
hololens
v4l2
handle
nsopenpanel
knapsack-problem
jms-topic
lines
voyager
gitosis
cocoa-scripting
flex3
multi-user
oracle-bpm-suite
ng-lightning
office-interop
google-cloud-powershell
flume-ng
peerjs
result
activeandroid
geminabox
emacs24
dynamic-linking
activesupport
codesniffer
qt3d
fileopendialog
indoor-positioning-system
alfred
jigsaw
change-password
kik
transaction-isolation
pyshark
paypal-subscriptions
chomsky-normal-form
music-player
videoview
github-for-mac
opendolphin
edgar
consul-template
skview
strcpy
pysvn
unityvs
indic
twitter-finagle
webshim
iwork
android-jack-and-jill
ardor3d
playing-cards
windows-scheduler
spawn
microsoft-speech-platform
gssapi
databus
systrace
nsscrollview
win-prolog
towerjs
visual-leak-detector
capitalization
mcpd
virtual-printer
vectorwise
overlays
method-call
designated-initializer
hs-err
helios
file-storage
time-management
djangoappengine
wtsapi32
cons

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