Change traefik listen domain¶
In rcstack the web app component by default only listens on the pre-defined domain specified at installation. There’s a way to expose rcstack to more domain names, e.g when using CNAMES. To do so, the apps override yaml file can be used.
in labels section, the Host() rules can be edited like in example below when we support 3 domains 2 additional (my.rhodecode.com,code.rhodecode.com) on top of RC_HOSTNAME
Open file .custom/docker-compose-apps.override.yaml
and override the domain labels for rhodecode app
services:
rhodecode:
deploy:
# set number of instances of services to be spawned on stack start
replicas: 1
environment:
RC_COMPOSE_OVERRIDE: 1
#DB_UPGRADE: 0 # 1 run the DB upgrade, 0 disable db upgrade at startup
#SETUP_APP: 0 # run the application default settings setup, can be turned off after initial run
labels:
- "traefik.enable=true"
- "traefik.http.routers.rhodecode.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`, `code.rhodecode.com`, `my.rhodecode.com`)"