You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Right now there are 5 different environment variables for configuring the main server hostname:
API_DEV_HOSTNAME
API_PROD_HOSTNAME
DOMAIN_OVERRIDE
EMBED_ SERVICE_HOSTNAME
SERVICE_URL
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:
Unify API_DEV_HOSTNAME and API_PROD_HOSTNAME to a single configuration variable (possibly using DEV_MODE to determine whether to allow localhost as a default if unset, to match current behavior)
Call this new variable API_HOSTNAME? POLIS_HOSTNAME? SERVER_HOSTNAME? Just HOSTNAME?
Remove the other configuration variables, in favor of afore mentioned merged variable
Additional context:
At the moment, it's unclear whether SERVICE_URL is only necessary for dev, when you might want to run a HMR server separately, outside of docker, or if it's necessary if you use (e.g.) s3 to host static assets separately from the docker (or other server) deployment infrastructure. Should ascertain this to decide whether this variable needs to be removed or not, and if not, whether another name would be more appropriate.
Consider whether we want a graceful fallback to API_PROD_HOSTNAME if whatever the new variable name is called isn't present (probably with a deprecation warning), to avoid this being a breaking change.
The text was updated successfully, but these errors were encountered:
Problem:
Right now there are 5 different environment variables for configuring the main server hostname:
API_DEV_HOSTNAME
API_PROD_HOSTNAME
DOMAIN_OVERRIDE
EMBED_ SERVICE_HOSTNAME
SERVICE_URL
For a production deployment, at least 3 of these (
API_PROD_HOSTNAME
,DOMAIN_OVERRIDE
andEMBED_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
andAPI_PROD_HOSTNAME
serve the same function, just in different environments, and behave the same, except that forDEV
, can default tolocalhost
if unset.Suggested solution:
API_DEV_HOSTNAME
andAPI_PROD_HOSTNAME
to a single configuration variable (possibly usingDEV_MODE
to determine whether to allowlocalhost
as a default if unset, to match current behavior)API_HOSTNAME
?POLIS_HOSTNAME
?SERVER_HOSTNAME
? JustHOSTNAME
?Additional context:
SERVICE_URL
is only necessary for dev, when you might want to run a HMR server separately, outside of docker, or if it's necessary if you use (e.g.) s3 to host static assets separately from the docker (or other server) deployment infrastructure. Should ascertain this to decide whether this variable needs to be removed or not, and if not, whether another name would be more appropriate.API_PROD_HOSTNAME
if whatever the new variable name is called isn't present (probably with a deprecation warning), to avoid this being a breaking change.The text was updated successfully, but these errors were encountered: