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

customize lucee5 docker image to allow running of multiple website within the image
Docker Toolbox Windows - Invalid volume specification
use nvidia-docker-compose launch a container, but exited soon
Why doesn't docker-compose 'down' take an optional [SERVICEā€¦] argument?
why does docker-compose build trigger a rebuild when nothing changed
Disable autostart of docker-compose project
Docker-compose Error-Mean Stack Application won't get loaded with the data from mongodb container
docker-compose Windows volume
Trying to figure out why eslint-watch doesn't work with docker-compose correctly
docker-compose the latest stable version on ubuntu
docker compose environment variable for command
java.net.UnknownHostException: failed to resolve 'inventory-microservice'. Exceeded max queries per resolve 3
What does working_dir tag mean in a docker-compose yml file
If I upgrade an image in docker-compose, will its volumes be lost?
How to solve this docker-compose upgrading error?
Fabric Network - what happens when a downed peer connects back to the network?

Categories

HOME
leaflet
intellij-idea
sip
fortran
ebay-api
google-docs-api
jshell
atlassian-fisheye
comments
box-api
websharper
oxid
nsoperation
openscad
versioning
vivado-hls
android-actionbar
alert
md2
openoffice-basic
connection-pooling
libxml2
drombler-fx
r-factor
deferred
edsdk
boost-log
ios-autolayout
luhn
pymunk
var
nscollectionview
susy
electron-packager
ape-phylo
java-5
gradlew
taleo
skype-bots
typewriter
nsalert
node.js-client
tsc
universe
joystick
virtualenvwrapper
mate-desktop
queuing
transaction-isolation
jmap
paypal-subscriptions
salesforce-service-cloud
alchemy
methodology
opendolphin
skscene
gnu-sort
mojolicious
autoscaling
borland-c++
page-refresh
glog
mergecursor
crystal-reports-7
illegalargumentexception
breeze-sharp
redmine-plugins
pnunit
ios-enterprise
oxygenxml
dotcmis
xps
windows-phone-store
mahara
xml-validation
scidb
dylan
caroufredsel
friendly-url
coinbase-php
report-viewer2010
sqlbuddy
idtabs
object-tag
excellibrary
datarelation
nstoolbar
simultaneous
silverlight-2.0
web-widget
scala-designer

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