Hi all!
Just wondering if someone would be kind enough to help, we’re setting up running Caddy locally for a bunch of stuff and we’re just setting up a Docker compose file to spin up our sites locally. Once we have everything up and running I can navigate to localhost:7000/login and everything works fine, however if I hit the configured Caddy url I get 502 Bad Gateway.
My Dockerfile looks like the following:
version: '3.4'
services:
app_a:
image: app-a
command: ./node_modules/.bin/nodemon .
expose:
- "7000"
ports:
- 7000:8080
app_b:
image: app-b
command: ./node_modules/.bin/nodemon .
expose:
- "7100"
ports:
- 7100:8081
proxy:
image: abiosoft/caddy
volumes:
- ./Caddyfile:/etc/Caddyfile
expose:
- "1234"
ports:
- 1234:1234
depends_on:
- app_a
- app_b
And my Caddyfile is as follows:
localhost:1234 {
proxy /app-a localhost:7000
proxy /app-b localhost:7100
}
If i navigate to or curl localhost:1234 I see the caddy proxy running successfully, however localhost:1234/app-a or app-b returns me a 502.
I’m hoping it’s something trivial I’m doing wrong.
Thanks