fix: correct Better Auth URL variable in docker-compose.yaml #668
+1
−1
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
This PR fixes an environment variable name mismatch in docker-compose.yaml that would cause authentication to fail in Docker deployments.
The Problem
The
docker-compose.yamlfile usesBETTER_AUTH_URL, but the actual codebase expectsNEXT_PUBLIC_BETTER_AUTH_URL.Evidence:
packages/auth/src/server.ts(lines 8 and 45) readsNEXT_PUBLIC_BETTER_AUTH_URLapps/web/.env.exampleusesNEXT_PUBLIC_BETTER_AUTH_URLNEXT_PUBLIC_BETTER_AUTH_URLChanges Made
Changed line 62 in docker-compose.yaml:
Impact
Without this fix, users deploying with Docker would encounter authentication failures because the Better Auth library wouldn't be able to find its base URL configuration.
Testing
This can be verified by:
packages/auth/src/server.ts- it destructuresNEXT_PUBLIC_BETTER_AUTH_URLfrom keys()baseURL: NEXT_PUBLIC_BETTER_AUTH_URLNote: This is a configuration fix that aligns docker-compose.yaml with the actual codebase requirements.