compdemocracy / polis

:milky_way: Open Source AI for large scale open ended feedback
https://pol.is
GNU Affero General Public License v3.0
717 stars 169 forks source link

Consolidate hostname/domain configuration #1746

Open metasoarous opened 7 months ago

metasoarous commented 7 months ago

Problem: Right now there are 5 different environment variables for configuring the main server hostname:

For a production deployment, at least 3 of these (API_PROD_HOSTNAME, DOMAIN_OVERRIDE and EMBED_SERVICE_HOSTNAME) are required, and should always be set to the same value. Meanwhile, SERVICE_URL is only used for client-report, and only necessary if hosted separately from the API service. Further, API_DEV_HOSTNAME and API_PROD_HOSTNAME serve the same function, just in different environments, and behave the same, except that for DEV, can default to localhost if unset.

Suggested solution:

Additional context: