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

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
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead
Swarm scheduling not working as expected using filters in compose file
issues in buiding Slate with Docker
Invalid type error in Docker Compose
Django cookiecutter with Docker add pip package
Docker Compose + Swarm + Machine Networking issue
docker-compose build image parameters --force-rm --pull
linking 2 containers through docker compose
Files created by manage.py commands not chown'd from root user

Categories

HOME
qlikview
grizzly
botframework
typo3
sip
customization
mysqli
spotfire
azure-resource-manager
perl6
pdf-generation
sitemap
revit-api
olap
aspectj
fine-uploader
background-image
pylint
cucumberjs
views
project-structure
computation-theory
android-wifi
minimagick
ejb-3.1
polybase
include-path
klipfolio
smali
wai-aria
advertising
pydub
large-files
windows-10-mobile
jsonapi-resources
imageprocessor
fisheye
keychain
directadmin
compiler-warnings
paperclip
apiman
wufoo
scrapinghub
django-cors-headers
anonymous-function
hierarchical-clustering
confluent
denodo
openidm
node-java
seyren
android-vectordrawable
grib
blackberry
robotc
catalyst
breadcrumbs
sharing
blitz3d
easy-thumbnails
mac-app-store
indoor-positioning-system
access-violation
disconnect
jigsaw
sprockets
db2-zos
angularfire
jmh
mod
trendline
markerspiderfier
gtkwave
kramdown
php-gd
redquerybuilder
om
log4cxx
eaaccessory
stderr
bungeecord
connection-timeout
system.io.packaging
conditional-comments
go-gin
worklight-appcenter
disparity-mapping
nspopupbutton
android-relativelayout
kuka-krl
nvcc
vbaccelerator
nop
complete
spawn
report-viewer2010
sup
erlide
mysql-connector
visual-leak-detector
automapper-2
iphone-maps
ffdshow
moores-law

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