Traefik and the (secondary) GCE server

tonycfromit

Blitz 1st Class
Original poster
Staff
99
43
So, just setup a GCE feeder server and everything is running great, but I really wasn't sure what to do about the Traefik setup stage of the build because my only owned domain is currently lashed to my original Hetzner server. What do most people here do so that they can use their GCE server, do they use Traefik and somehow set the subdomains to different labels than the ones used by the apps of their main plexguide server, so when they go to "sonarr.mydomain.com" they get their main plexguide server but when they go to "GCE-sonarr.mydomain.com" they see the GCE server, or do you do it some other way?
 

rcarteraz

Blitz Sergeant
159
35
I was in the same boat as you and had no idea. I jut purchased another domain for my feeder as it was only $1 to do so. Easiest path for me lol.
 
  • Like
Reactions: tonycfromit

tonycfromit

Blitz 1st Class
Original poster
Staff
99
43
I was in the same boat as you and had no idea. I jut purchased another domain for my feeder as it was only $1 to do so. Easiest path for me lol.
ok, stupid question, but where did you go to get one for only a dollar?
 

hawk2g

Blitz 2nd Class
40
20
Yeah, I've changed the labels so they have different sub domains. I have 1 domain which has 4 servers using it as of now. I added a prefix for their sub domain, e.g. s1-plex.domain.name. I made this change in /opt/plexguide/programs/containers & core, so every time a container is installed, reinstalled or updated, it keeps it's correct sub domain name.

Changes are /opt/plexguide/programs/core/main.yml
Find>>
############################## PRIMARY INFORMATION
- name: Launch Container Primary Information
include_tasks: "../containers/{{pgrole}}.yml"

- name: "Set Default Labels"
set_fact:
default_labels:
traefik.frontend.auth.basic.users: "{{authorization}}"
traefik.enable: "true"
traefik.port: "{{intport}}"
traefik.frontend.redirect.entryPoint: "https"
traefik.frontend.headers.customResponseHeaders: 'X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex'
traefik.frontend.rule: "Host:s1-{{pgrole}}.{{domain.stdout}}" <<< CHANGE THIS. add whatever prefix you want with allowed characters.

Do the same for programs with override files in /opt/plexguide/programs/containers

Save $ and use 1 domain
 
  • Like
Reactions: rcarteraz

Admin9705

Administrator
Project Manager
5,737
1,945
Yeah, I've changed the labels so they have different sub domains. I have 1 domain which has 4 servers using it as of now. I added a prefix for their sub domain, e.g. s1-plex.domain.name. I made this change in /opt/plexguide/programs/containers & core, so every time a container is installed, reinstalled or updated, it keeps it's correct sub domain name.

Changes are /opt/plexguide/programs/core/main.yml
Find>>
############################## PRIMARY INFORMATION
- name: Launch Container Primary Information
include_tasks: "../containers/{{pgrole}}.yml"

- name: "Set Default Labels"
set_fact:
default_labels:
traefik.frontend.auth.basic.users: "{{authorization}}"
traefik.enable: "true"
traefik.port: "{{intport}}"
traefik.frontend.redirect.entryPoint: "https"
traefik.frontend.headers.customResponseHeaders: 'X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex'
traefik.frontend.rule: "Host:s1-{{pgrole}}.{{domain.stdout}}" <<< CHANGE THIS. add whatever prefix you want with allowed characters.

Do the same for programs with override files in /opt/plexguide/programs/containers

Save $ and use 1 domain
Ya that piece no longer exist. New setup with opt/plexguide/containers only
 

tonycfromit

Blitz 1st Class
Original poster
Staff
99
43
Ya that piece no longer exist. New setup with opt/plexguide/containers only
Sorry, I am not sure what you mean here. Will that method no longer work? If not, what is the new way of doing the same thing (i.e. putting the GCE versions of the *darrs in with your first domain)?
 

hawk2g

Blitz 2nd Class
40
20
Sorry, I am not sure what you mean here. Will that method no longer work? If not, what is the new way of doing the same thing (i.e. putting the GCE versions of the *darrs in with your first domain)?
The locations and files have been changed slightly. So instead of the core.yml and override files, you just edit the container's yml file.
The yml files are located here: /opt/plexguide/containers/
Edit the apps you are going to use, for example, portainer/plex/tautulli/sonarr/radarr/jackett/ombi are some that I use. Once you edit the file with a text editor, look for "Default Labels".

- name: "Set Default Labels"
set_fact:
default_labels:
traefik.enable: "true"
traefik.port: "{{intport}}"
traefik.frontend.redirect.entryPoint: "https"
traefik.frontend.rule: "Host:{{pgrole}}.{{domain.stdout}},{{tldset}}"
Change traefik.frontend.rule to whatever you like. I make it simple and add a prefix per server, so mine looks like this.
traefik.frontend.rule: "Host:whiskas-{{pgrole}}.{{domain.stdout}}"
If this were done on portainer.yml and my domain name is catlife.me, the subdomain will look like "whiskas-portainer.catlife.me"
 
  • Like
Reactions: rcarteraz

tonycfromit

Blitz 1st Class
Original poster
Staff
99
43
Thank you so much!! Great info!

---- Automatically Merged Double Post ----

Side Question:

when you guys setup GCE servers, do you move your *darr databases to it or start fresh? I am asking as this takes forever to setup from scratch after finally getting it set on my original setup so I would like to avoid the setup process with Radarr going through all of the movies I want to update.
 
Last edited:

fr0sty

Blitz 1st Class
Staff
Donor
96
17
Hey this is helpful but i cant seem to get it to work. I edited my yml files and the changes are displayed in portainer under labels in traefik.frontend.rule but i get nothing when i go to the url. I did changed the _core.yml aswell as redeployed traefik and restarted containers. Any tips where i messed up?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Development Donations

 

Trending