Discussion Traefik and the (secondary) GCE server

  • Guest - 7.5 will focus on bug fixing for all the containers including wiki writeup. Thanks to those who tested 7.4 (which will continue to receive minor updates). 7.5 should not be anything radical or drastic (unlike PGBox and PGClone).

tonycfromit

PG Ambassador
Member
Mar 16, 2018
63
27
Reactions
27 0 0
#1
PG Version
7.1.6
Server Type
Google - GCE
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

PG Ambassador
Member
Nov 14, 2018
98
24
Reactions
24 0 0
#2
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.
 

tonycfromit

PG Ambassador
Member
Mar 16, 2018
63
27
Reactions
27 0 0
#3
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?
 

rcarteraz

PG Ambassador
Member
Nov 14, 2018
98
24
Reactions
24 0 0
#4
Purchased through Namecheap and then set my DNS to Cloudflare.
 

macfreaker

PG Elite
Elite Sponsor
Jul 16, 2018
109
53
Reactions
53 0 0
#6
I am using duckdns. Works great and is free.
 
Assists Greatly with Development Costs

hawk2g

PG Overlord
Member
May 2, 2018
29
20
Reactions
20 0 0
#8
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
 

Admin9705

Administrator
Project Manager
Jan 17, 2018
3,991
1,699
Reactions
1,699 0 0
#9
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
 
Assists Greatly with Development Costs

tonycfromit

PG Ambassador
Member
Mar 16, 2018
63
27
Reactions
27 0 0
#10
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

PG Overlord
Member
May 2, 2018
29
20
Reactions
20 0 0
#11
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"
 

tonycfromit

PG Ambassador
Member
Mar 16, 2018
63
27
Reactions
27 0 0
#12
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:
Assists Greatly with Development Costs

fr0sty

PG Veteran
Member
Jul 8, 2018
20
4
Australia
Reactions
4 0 0
#13
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?
 

PG Developer Donations

 

Forum statistics

Threads
2,365
Messages
14,363
Members
4,826
Latest member
LightOfBuddha