-
Hello and first of all thank you for ReProxy) Could you please take a look what I'm doing wrong? version: "3.9"
services:
gatus:
image: twinproduction/gatus:latest
hostname: gatus
container_name: gatus
restart: always
ports:
- "8080:8080"
volumes:
- ./data.yml:/config/gatus.yml And then run reproxy with docker-compose: version: "3.9"
services:
reproxy:
image: umputun/reproxy:master
container_name: reproxy
hostname: reproxy
ports:
- "80:8080"
- "8081:8081"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- LISTEN=0.0.0.0:8080
- DOCKER_ENABLED=true
- DOCKER_AUTO=true
- DEBUG=true
- MGMT_ENABLED=true
I see that gatus container is discoverable for reproxy: [INFO] {discovery/discovery.go:140 discovery.(*Service).Run} proxy docker: * ^/gatus/(.*) -> http://192.168.80.2:8080/$1 {
"*": [
{
"route": "^/gatus/(.*)",
"destination": "http://192.168.80.2:8080/$1",
"server": "*",
"match": "proxy",
"provider": "docker",
"ping": "http://192.168.80.2:8080/ping"
}
]
} But when I go to [DEBUG] {proxy/proxy.go:246 proxy.(*Http).proxyHandler.func2} proxy to http://192.168.80.2:8080/api/v1/endpoints/statuses
[WARN] {lgr/adaptor.go:16 lgr.(*Writer).Write} http: proxy error: dial tcp 192.168.80.2:8080: i/o timeout If I use compiled version of reproxy instead of docker then everything works as expected. P.S. [DEBUG] {app/main.go:151 main.main} options: {
Listen:0.0.0.0:8080
MaxSize:64K
GzipEnabled:false
ProxyHeaders:[]
DropHeaders:[]
AuthBasicHtpasswd:
LBType:random
SSL:{Type:none Cert: Key: ACMELocation:./var/acme ACMEEmail: RedirHTTPPort:0 FQDNs:[]}
Assets:{Location: WebRoot:/ SPA:false CacheControl:[] NotFound:}
Logger:{StdOut:false Enabled:false FileName:access.log MaxSize:100M MaxBackups:10}
Docker:{Enabled:true Host:unix:///var/run/docker.sock Network: Excluded:[] AutoAPI:true APIPrefix:}
ConsulCatalog:{Enabled:false Address:http://127.0.0.1:8500 CheckInterval:1s}
File:{Enabled:false Name:reproxy.yml CheckInterval:3s Delay:500ms}
Static:{Enabled:false Rules:[]}
Timeouts:{ReadHeader:5s Write:30s Idle:30s Dial:30s KeepAlive:30s ResponseHeader:5s IdleConn:1m30s TLSHandshake:10s ExpectContinue:1s}
Management:{Enabled:true Listen:0.0.0.0:8081}
ErrorReport:{Enabled:false Template:}
HealthCheck:{Enabled:false Interval:5m0s}
Throttle:{System:0 User:0}
Plugin:{Enabled:false Listen:127.0.0.1:8081}
Signature:false Dbg:true} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think, the issue here is two distinct docker networks and this is why reproxy can't access your application (gatus) on 192.168.80.2 you need to add this section to your reproxy compose:
and modify the application compose to allow the access by adding
see https://docs.docker.com/compose/networking/ for more details |
Beta Was this translation helpful? Give feedback.
I think, the issue here is two distinct docker networks and this is why reproxy can't access your application (gatus) on 192.168.80.2
you need to add this section to your reproxy compose:
and modify the application compose to allow the access by adding
networks
:see https://docs.docker.com/compose/networking/ for more details