I have several machines across the world in a VLAN using tailscale.
on this network I have a docker swarm.
I am using traefik to route and load balance to my webserver service that is created in a different stack.
I am using unencrypted http.
when I navigate to the public domain name for my webserver it starts to load. the browser tab gets renamed and the pages turns white. the spinner spins... but here it hangs.
the html file is received through the GET request. but the css and js files that are called out in the html file seem to hang on the GET request. the page hangs indefinetly.
I attempted to use curl -v to pull the files and it also hangs. I get this message:
mark@YOGA9i:~$ curl -v http://mypublicdomain/index-bfb2ae58.css
* Trying myipaddress:80...
* Connected to mypublicdomain (myipaddress) port 80 (#0)
> GET /assets/index-bfb2ae58.css HTTP/1.1
> Host: mydomainname
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Length: 348735
< Content-Type: text/css; charset=utf-8
< Date: Sat, 08 Jul 2023 03:35:15 GMT
< Etag: 9e345a412fc9970eeb8947e3f60b3e01
< Last-Modified: Fri, 07 Jul 2023 18:36:08 GMT
< Server: uvicorn
I have changed the IP and domain names to keep my privacy. if I do curl on just the domain it does return the index.html file.
here are the docker-compose.yml files
version: "3.8"
services:
traefik:
image: "traefik:v2.4"
ports:
- 80:80
- 8080:8080
command:
- --log.level=TRACE
- --api.insecure=true
- --api.debug=true
- --ping=true
- --providers.docker=true
- --providers.docker.swarmMode=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=traefik-public-ntwk
- --providers.docker.watch=true
- --api.dashboard=true
- --entrypoints.web.address=:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
placement:
constraints:
- node.hostname == webhookdev
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public-ntwk"
- "traefik.http.services.traefik-public.loadbalancer.server.port=8080"
networks:
- traefik-public-ntwk
webhooks-listener:
image: gunicorn_wh
volumes:
- W-repo:/W
#ports:
#- "5000:5000"
deploy:
replicas: 1
labels:
- traefik.enable=true
- traefik.http.routers.webhooks.entrypoints=web
- traefik.http.routers.webhooks.rule=Method("POST") && Path("/test")
- traefik.http.services.webhooks.loadbalancer.server.port=5000
- traefik.docker.network=traefik-public-ntwk
command:
["gunicorn", "-w", "1", "-t", "60", "-b", "0.0.0.0:5000", "main:app"]
networks:
- traefik-public-ntwk
environment:
FLASK_ENV: development
volumes:
W-repo:
driver: local
driver_opts:
type: nfs
o: addr=dellprecision2,rw
device: :/mnt/nfs_share
networks:
traefik-public-ntwk:
driver: overlay
attachable: true
name: traefik-public-ntwk
AND FOR THE SERVICE THAT RUNS THE WEBSERVER
---
version: '3'
services:
freqtrade:
image: freqtradeorg/freqtrade:stable
# image: freqtradeorg/freqtrade:develop
# Use plotting image
# image: freqtradeorg/freqtrade:develop_plot
# Build step - only needed when additional dependencies are needed
volumes:
- /W/${USERDATA}:/freqtrade/user_data
networks:
- traefik-public-ntwk
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: none
labels:
- "traefik.enable=true"
- 'traefik.http.routers.dev.rule=Host("mypublicdomain.com")'
- "traefik.http.services.dev.loadbalancer.server.port=8080"
#restart: unless-stopped
# Expose api on port 8080 (localhost only)
# Please read the https://www.freqtrade.io/en/stable/rest-api/ documentation
# before enabling this.
# Default command used when running `docker compose up`
command: ${FT_COMMAND}
volumes:
W-repo:
driver: local
driver_opts:
type: nfs
o: addr=dellprecision2,rw
device: :/mnt/nfs_share/${USERDATA}
networks:
traefik-public-ntwk:
external: true