diff --git a/Dockerfile b/Dockerfile index 45041c0a..315743b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:latest LABEL maintainer="yusing@6uo.me" -RUN apk add --no-cache bash +RUN apk add --no-cache bash tzdata RUN mkdir /app COPY bin/go-proxy entrypoint.sh /app/ COPY templates/ /app/templates diff --git a/bin/go-proxy b/bin/go-proxy index 763fba8b..1bfacbb5 100755 Binary files a/bin/go-proxy and b/bin/go-proxy differ diff --git a/compose.example.yml b/compose.example.yml index cc014b26..0dc9de74 100755 --- a/compose.example.yml +++ b/compose.example.yml @@ -21,6 +21,8 @@ services: - /path/to/privkey.pem:/certs/priv.key:ro - ./log:/app/log # path to logs - /var/run/docker.sock:/var/run/docker.sock:ro + dns: + - 127.0.0.1 # workaround for "lookup: no such host" extra_hosts: - host.docker.internal:host-gateway # required if you have containers in `host` network_mode logging: diff --git a/src/go-proxy/main.go b/src/go-proxy/main.go index c1ba3c4c..12a79bfe 100755 --- a/src/go-proxy/main.go +++ b/src/go-proxy/main.go @@ -17,6 +17,7 @@ func main() { var err error flag.Parse() runtime.GOMAXPROCS(runtime.NumCPU()) + time.Now().Zone() dockerClient, err = client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) if err != nil { diff --git a/templates/panel.html b/templates/panel.html index 21f02046..f7f974c6 100755 --- a/templates/panel.html +++ b/templates/panel.html @@ -72,8 +72,8 @@ function updateHealthStatus() { let rows = document.querySelectorAll('tbody tr'); rows.forEach(row => { - let url = row.cells[3].textContent; - let cell = row.cells[4]; // Health column cell + let url = row.querySelector('#url-cell').textContent; + let cell = row.querySelector('#health-cell'); // Health column cell checkHealth(url, cell); }); } @@ -113,8 +113,8 @@ {{$alias}} {{$path}} {{$route.PathMode}} - {{$route.Url.String}} - + {{$route.Url.String}} +
@@ -140,8 +140,8 @@ {{$route.Alias}} {{$route.ListeningUrl}} - {{$route.TargetUrl}} - + {{$route.TargetUrl}} +