docker-compose


docker caddy proxy not forwarding


So I set up the caddy server using docker and have set it to proxy to another docker image that is running nodejs. However, when i hit the url it is routing to caddyserver.com instead of my nodejs. Is there something that I am missing:
myserver {
proxy / 172.17.0.5:8000 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
}
}
My docker-compose looks like following:
web:
image: ca9a385372b0
env_file: .env
environment:
AUTO_ALIASES: /src/docker/aliases/auto
TERM: xterm-256color
VIRTUAL_HOST: myserver
VIRTUAL_PORT: 8000
volumes:
- .:/src
ports:
- "8000:8000"
container_name: web
links:
- caddy
caddy:
image: blackglory/caddy-proxy:0.2.1
env_file: .env
environment:
CADDY_OPTIONS: "-email someaddress#myserver.com"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- "80:80"
- "443:443"
i added following to my /etc/hosts also
127.0.0.1 myserver
However, when I goto http://myserver it redirects me to caddyserver.com
my .env file looks like this
WEB_VIRTUAL_HOST=myserver
WEB_VIRTUAL_PORT=8000

Related Links

How to solve this docker-compose upgrading error?
Fabric Network - what happens when a downed peer connects back to the network?
Docker-compose and load balancing
Run arguments in Docker Compose
Docker compose file config
Systemd “No such file or directory” itself during “docker-compose up”
Docker compose yml static IP addressing
compose extend file results in a validation error
hubot rocketchat adapter does not work
Docker compose lables constraint:node not work
is it possible to generate a random mysql password with dockercompose
Networking Docker Compose
How to change the config file for Riak TS when using Docker
Django Docker-compose machine does not start web server
How should docker-compose jobs discover etcd?
docker compose adding nodes dynamically to nginx frontend

Categories

HOME
excel-formula
youtube-api
teradata
typo3
postgresql-9.3
ibm
blob
x509certificate
itext7
overrides
gnuradio
markdown
vsixmanifest
restheart
subprocess
dcos
google-my-business-api
spring-data-solr
olap
unreal-engine4
xmlhttprequest
fine-uploader
appsettings
jsfiddle
multibinding
audio-streaming
formulas
wai-aria
scrapy-spider
emr
restangular
multilanguage
key-bindings
spring-oauth2
microstrategy
zimbra
bootcamp
pymunk
gstreamer-1.0
pygraphviz
mediastream
redbean
ape-phylo
pexpect
nshttpurlresponse
line-endings
jks
activeandroid
jcs
extjs3
jtextarea
addressbook
indoor-positioning-system
tinybox2
cosign-api
airwatch
kik
django-taggit
factorization
encode
ruby-1.8.7
nmock
pdcurses
system.diagnostics
valdr-bean-validation
ultraedit
strcpy
google-experiments
mathics
javadb
os.walk
nest-initiative
drawable
opencobol
iwork
db2-connect
dylan
removeall
mmo
blotter
yii-components
databus
pdf-reader
wxperl
automapper-2
zend-validate
arraycollection
oaw
webdb
data-formats
asp.net-1.1
scalable

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