docker-compose


Docker-compose and load balancing


I am using docker-compose and haproxy for load balancing.
My docker-compose.yml looks like this:
weba:
build: .
expose:
- 80
webb:
build: .
expose:
- 80
webc:
build: .
expose:
- 80
haproxy:
image: hypriot/rpi-haproxy
volumes:
- haproxy:/haproxy-override
links:
- weba
- webb
- webc
ports:
- "80:80"
- "70:70"
expose:
- "80"
- "70"
weba:
image: 904c7229f267(my docker image id)
webb:
image: 904c7229f267
webc:
image: 904c7229f267
When i start my docker-compose , its starting haproxy and my three containers(weba,b,c). But not able to access though browser.
I also configured haproxy locally(haproxy/haproxy.cfg) which looks like this:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 10000
timeout server 10000
listen stats :70
stats enable
stats uri /
frontend balancer
bind 0.0.0.0:80
mode http
default_backend aj_backends
backend aj_backends
mode http
option forwardfor
# http-request set-header X-Forwarded-Port %[dst_port]
balance roundrobin
server weba weba:80 check
server webb webb:80 check
server webc webc:80 check
# option httpchk OPTIONS * HTTP/1.1\r\nHost:\ localhost
option httpchk GET /
http-check expect status 200
Could someone help me with what iam missing or doing wrong??

Related Links

Django Docker-compose machine does not start web server
How should docker-compose jobs discover etcd?
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?

Categories

HOME
asp.net
spring-boot
autohotkey
excel-formula
ckan
azure-documentdb
primefaces
cors
wifi
file-upload
postsharp
livecharts
ebay
confluence-rest-api
atlassian-fisheye
aggregate-functions
cdn
osx-yosemite
google-api-oauth
ephesoft
pyodbc
ndepend
osrm
mongodb-replica-set
derby
saucelabs
background-image
multibinding
taxonomy
versioning
aws-devicefarm
webgl-earth
combinations
angular2-pipe
uipath
ecmascript-2017
webclient
openvms
machine-code
perf
sdl-2
gstreamer-1.0
azure-storage-files
extern
stochastic-process
icu
google-chrome-console
jvisualvm
uitextview
ocamlbuild
lucee
google-cloud-shell
cloudconvert
chain
printer-control-language
lightspeed
nls
stringbuilder
computed-properties
universe
require-handlebars
tinybox2
laterjs
phpdesigner
wiql
gulp-cdnizer
transbase
php-gd
exchange-server-2007
uinavigationitem
tess4j
opennebula
autopep8
launcher
frisby.js
powershell-v1.0
livescript
starling-framework
mongoid4
lastinsertid
google-voice
ia-32
android-library
exi
pageload
nsregularexpression
tasklist
wpml
states
php-gettext
android-memory
eeprom
cgaffinetransform
zend-validate
meego-harmattan
quazip
s60
table-valued-parameters
web-search
newspeak
data-formats

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