Custom Domain name
About this guide
This guide will explain how to configure TAO Community Edition to use a custom domain name.
We will assume you already have a domain name available (private or public), and you know how to redirect traffic pointing to this domain.
This guide will not cover how to register a domain name, neither how you can configure your DNS zones or DNS settings.
TAO Community Edition publishes itself as https://community.tao.internal; which is right when you just want a quick tour of its features, however, you may want to customize TAO domain name to an address more relevant for your organization.
To support a custom domain name, we will have to:
- update
tao.yamlfile - update
/etc/hostsin container - re-install TAO Community Edition
How-to
Update tao.yaml and /etc/hosts file
In config file documentation, we describe the role of this file, and how to update it.
You can update tao.yaml file with one of the following methods to support custom domain:
If you are using docker-compose.yml file from tao-ce/tao-ce repository, the easiest way to configure your domain is by declaring TAO_CE_PUBLIC_DOMAIN environment variable while starting containers.
export TAO_CE_PUBLIC_DOMAIN="tao.is-awesome.example.org"
Environment variable will override default value community.tao.internal while reading docker-compose.yaml, and also update /etc/hosts file in container.
You need to update tao.yaml file to change publicDomain:
spec:
publicDomain: tao.is-awesome.example.org
...
Also, if you use docker-compose.yml file, you need to ensure tao service has correct extra_hosts:
services:
tao:
# [...]
extra_hosts:
- tao.is-awesome.example.org:0.0.0.0
ports:
- 443:443
# [...]
Re-install TAO Community Edition
Data will be deleted
Reinstallation will required to remove all volumes, databases and files.
In particular, all users, tests or results will be deleted.
Changing domain will impact several internal configurations, and it is required to re-install TAO Community Edition.
# Remove all containers and volumes
docker compose down -v
# Restart all containers
docker compose up -d
Propagate new domain name
As described in Preparation guide following installation, you will have to update how your browser (and other hosts) resolve your new domain.
Aside modifying /etc/hosts file, domain name can be propagate through DNS servers, so you can publish your service on your Local Area Network, or even on Internet.