Hello,
I am new to traefik and i like the product and want to implement this in my home environment.
I like the idea of traefik that it works dynamicly. When a new app is started, it automaticly is registered with the reverse proxy and it also can get a lets encrypt certificate automaticly.
My problem is that i run docker on my Synology DS1019+. The Synology has port 80 and 443 already in use. How can i fix this in a way that the nginx reverse proxy of the synology keeps working for the synology stuff and Traefik is serving all my docker apps on port 80 and 443?
I have 4 Apps running now and each app has his own custom docker bridge. Only the web ports of the apps are published. The services of app1 can not communicate to the services of app2 and app3.
How can i implement Traefik to sorve this apps as a reverse proxy
I tried a macvlan for the traefik installation but i am stuck on how i need to connect the apps to the reverse proxy using the dynamic tools.
Kind regards,
Wouter Iliohan
Hello, this is exactly how I have traefik setup. Simply expose any other port you like in docker-compose, for example 81 for HTTP and and 444 for HTTPS :
ports:
- target: 80 #internal, container
published: 81 #external to host
protocol: tcp
mode: host
- target: 443
published: 444
protocol: tcp
mode: host
- target: 8080
published: 8080
protocol: tcp
mode: host
Then, in your router configuration, you can port forward:
Name: HTTP Traefik
External port: port 80
Internal port: port 81 [or whichever port you chose for HTTP]
Protocol: TCP and UDP (or just TCP)
Internal IP: [your Synology local IP]
Name: HTTPS Traefik
External port: port 443
Internal port: port 444 [or whichever port you chose for HTTP]
Protocol: TCP and UDP (or just TCP)
Internal IP: [your Synology local IP]
If you apply this, the Synology nginx will not be exposed anymore, so you will need to point traefik to all of your Synology services.
Hope this helps!
I resolved my own issue by creating VLANs on the synology. I have 2 interfaces that forming a bond. On this bond i enbled VLANs and use 1 VLAN for the synology traefik. Via the synology CLI i created a secondary VLAN without an IP and create a docker macvlan pointing to that vlan interface. each VLAN has its own IP address space and my router routes the trafic from VLAN A to VLAN B.
On this macvlan i connect the traefik front-end interface with an IP address in VLANB. Now the traefik container can communicate with the docker host that has a IP in VLAN A.
this trik keeps working after reboots and firmware upgrades.
I also found trick with linking the docker host mac to an IP in the macvlan but i did not got that trick working.
Now my local pc can browse to my local docker websites using port 80 of 443.
I forgot to meniton i also run my own .local DNS service and all my docker websites have a .local DNS name and a .eu name.