Hello. Please give me a suggestion.
I have one domain name and services which use prefixes. For example,
Wordpress uses /,
Nextcloud uses /cloud,
Dokuwiki uses /wiki
etc.
Now I'd like to install Frigate which cannot change its web root path so it's necessary to use it on the root of my domain. However, the root is already occupied by Wordpress.
I created additional HTTPS entrypoint on port 5000
frigate:
address: ":5000"
http:
tls:
certResolver: le
redirections:
entryPoint:
scheme: https
and labels for Frigate in docker-compose:
labels:
- "traefik.enable=true"
- "traefik.http.routers.frigate.entrypoints=frigate"
- "traefik.http.routers.frigate.rule=Host(`mydomain.com`)"
- "traefik.http.services.frigate.loadbalancer.server.port=5000"
but when I open https://mydomain.com:5000 , it opens Wordpress or gives an error (I experimented a lot, can't remember all things I had done).
Is it possible to publish Frigate on port 5000 and make Traefik understand that it must send everything from port 5000 to Frigate container?
If it opens Wordpress, I would assume that you have not set entrypoints for the Wordpress router, then Traefik automatically attaches it to all entrypoints.
So just set Wordpress to web-secure
or whatever you named your https entrypoint.
1 Like
Thank you very much!
I set "websecure" endpoint for all containers which should be published except frigate, where I set "frigate" endpoint.
version: '3.7'
services:
reverse-proxy:
image: traefik:2.6
container_name: reverse-proxy
restart: unless-stopped
command:
--providers.docker=true
--providers.docker.exposedByDefault=false
--entryPoints.web.address=:80
--entrypoints.web.http.redirections.entryPoint.to=websecure
--entrypoints.web.http.redirections.entrypoint.scheme=https
--entryPoints.websecure.address=:443
--entrypoints.websecure.http.tls=true
--entrypoints.websecure.http.tls.options=default@file
--entryPoints.frigate.address=:5000
--entrypoints.frigate.http.tls=true
--entrypoints.frigate.http.redirections.entrypoint.scheme=https
--entrypoints.frigate.http.tls.options=default@file
--providers.file.filename=/etc/traefik/dynamic.toml
--serversTransport.insecureSkipVerify=true
--certificatesresolvers.le.acme.email=email@example.com
--certificatesresolvers.le.acme.storage=acme.json
--certificatesresolvers.le.acme.tlschallenge=true
--accesslog=true
ports:
- 80:80
- 443:443
- 5000:5000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik:/etc/traefik
- ./traefik/acme.json:/acme.json
frigate:
container_name: frigate
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "64mb"
volumes:
- /etc/localtime:/etc/localtime:ro
- ~/docker/frigate/config.yml:/config/config.yml
- ~/docker/frigate/storage:/media/frigate
- type: tmpfs # Optional: 500MB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 500000000
expose:
- "5000"
ports:
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
labels:
- "traefik.enable=true"
- "traefik.http.services.frigate.loadbalancer.server.port=5000"
- "traefik.http.routers.frigate.rule=Host(`domain.com`,`192.168.1.6`)"
- "traefik.http.routers.frigate.entrypoints=frigate"
- "traefik.http.routers.frigate.tls.certresolver=le"
Works perfectly!
system
Closed
November 24, 2023, 7:38pm
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.