feat(dify): make public URLs individually overridable - #172
Merged
Conversation
`dify.commonEnvs` derived all public URL env vars (CONSOLE_API_URL, CONSOLE_WEB_URL, SERVICE_API_URL, APP_API_URL, APP_WEB_URL, ENDPOINT_URL_TEMPLATE) from a single `dify.baseUrl`, so the chart was single-domain only. Dify itself supports serving the console, published WebApp, and service API on different hosts. Emit each URL from its own optional `global.*` value, defaulting to `dify.baseUrl` so unset behavior is byte-identical to before. Also add optional FILES_URL, TRIGGER_URL, and NEXT_PUBLIC_SOCKET_URL, emitted only when set. Verified with `helm template`: a render with no new values set is identical to the previous chart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dify.commonEnvscurrently derives all public URL env vars from a singledify.baseUrl(global.host/baseUrlOverride), so the chart is effectively single-domain:Dify itself supports serving the console, the published WebApp, and the service API on different hostnames. Today the only way to do that with this chart is to fork it or resort to duplicate-env hacks. This PR lets each URL be set independently, while keeping the single-domain default untouched.
fix #171
Changes
global.*value, defaulting todify.baseUrlwhen unset.FILES_URL,TRIGGER_URL,NEXT_PUBLIC_SOCKET_URL.values.yaml(commented, underglobal:) andREADME.md.0.9.1→0.10.0.New
global.*valuesconsoleApiUrlCONSOLE_API_URLdify.baseUrlconsoleWebUrlCONSOLE_WEB_URLdify.baseUrlserviceApiUrlSERVICE_API_URLdify.baseUrlappApiUrlAPP_API_URLdify.baseUrlappWebUrlAPP_WEB_URLdify.baseUrlendpointUrlTemplateENDPOINT_URL_TEMPLATE<baseUrl>/e/{hook_id}filesUrlFILES_URLtriggerUrlTRIGGER_URLnextPublicSocketUrlNEXT_PUBLIC_SOCKET_URLBackward compatibility
100% — with no new values set, the rendered env is byte-identical to the current chart. Verified with
helm template: a full render with default valuesdiffs clean againstmaster(aside from thehelm.sh/chartversion label). The five console/app/service URLs equalbaseUrl,ENDPOINT_URL_TEMPLATEequals<baseUrl>/e/{hook_id}, and the three new vars stay absent.Testing