Success, got this working! Thanks, @bluepuma77
For the powerwall config:
pypowerwall:
image: jasonacox/pypowerwall:0.6.2t28
container_name: pypowerwall
hostname: pypowerwall
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
env_file:
- pypowerwall.env
labels:
- "traefik.enable=true"
- "traefik.http.routers.pypowerwall.tls=true"
- "traefik.http.routers.pypowerwall.rule=Host(`grafana.$MY_DOMAIN`)"
- "traefik.http.routers.pypowerwall.entrypoints=pypw_secure"
- "traefik.http.services.pypowerwall.loadbalancer.server.port=8675"
Keypoint there is to use the grafana host, because that is hardcoded.
Then for the traefik config:
traefik:
image: traefik:latest
container_name: traefik
hostname: traefik
networks:
- traefik-proxy
ports:
- 80:80
- 443:443
- 8080:8080
- "${PYPOWERWALL_PORTS:-8675:8675}" ## add the port here
environment:
LEGO_CA_CERTIFICATES: "/etc/traefik/certs/root.crt"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./traefik.yml:/traefik.yml:ro"
- "/mnt/container_data/traefik/certs:/etc/traefik/certs:ro"
- "acme:/etc/acme"
volumes:
acme:
networks:
traefik-proxy:
external: true
and finally add entry point!
entryPoints:
web:
address: ":80"
http:
redirections:
entrypoint:
to: "websecure"
scheme: "https"
websecure:
address: ":443"
pypw_secure:
address: ":8675"