Make express app Path Aware
Opened this issue · 0 comments
** PLEASE ONLY USE THIS ISSUE TRACKER TO SUBMIT ISSUES WITH THE DOCKER SWARM VISUALIZER **
- If you have a bug working with Docker itself, not related to these labs, please file the bug on the Docker repo *
- If you would like general support figuring out how to do something with Docker, please use the Docker Slack channel. If you're not on that channel, sign up for the Docker Community and you'll get an invite. *
- Or go to the Docker Forums *
Please provide the following information so we can assess the issue you're having
Description
Image dockersamples/visualizer not working using traefik image as reverse proxy. I've done Docker Swarm deployed properly. I put dockersamples/visualizer image running as expected but proxied by traefik under the my.domain.com/my-path/ and I'm only getting the index.tpl file and not the Javascript file that makes app funcion properly. File index.tpl calls the script directly (="app.js") rather use relative path syntax (="./app.js"). When I call that Javascript file using a relative path the behavior it's as expected, and config traefik to proxy to the root path (/) works as well.
Steps to reproduce the issue, if relevant:
1.
2.
3.
Describe the results you received:
Being able to watch in live my swarm nodes under a proxied path by traefik.
Describe the results you expected:
I just get the HTML index page, but not the other elements that make app functions properly.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version
:
Docker version 24.0.7, build afdd53b
Output of docker info
:
Client: Docker Engine - Community
Version: 24.0.7
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.21.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 3
Running: 3
Paused: 0
Stopped: 0
Images: 4
Server Version: 24.0.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: yhoz1r5afnieivhetnheh51kz
Is Manager: true
ClusterID: zfjfz9e19646kknrpxp265r9x
Managers: 1
Nodes: 3
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 34.70.254.180
Manager Addresses:
34.70.254.180:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: a1496014c916f9e62104b33d1bb5bd03b0858e59
runc version: v1.1.11-0-g4bccb38
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.10.0-27-cloud-amd64
Operating System: Debian GNU/Linux 11 (bullseye)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 975.6MiB
Name: swarm-node-1
ID: 4f0f76d6-72fb-4afe-8c8f-2a0dd65cad53
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: pssatechies
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):