Skip to content

organize all public env build args - #75

Merged
HangYeung1 merged 4 commits into
mainfrom
fix/public-env
Sep 25, 2026
Merged

HangYeung1 merged 4 commits into
mainfrom
fix/public-env

Conversation

@HangYeung1

@HangYeung1 HangYeung1 commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Pass every NEXT_PUBLIC_* value into the Docker build as one base64 build arg, then write it to .env.production.local before next build so Next inlines it.
  • Drop those same five variables from the ECS task definition. They are public build-time config; server secrets stay in SSM.
  • Keep the GitHub Actions output on one line so base64 -w0 does not glue the value to the following delimiter.

Closes #29

Test plan

  • Confirm the CD "Prepare build env" step emits a single env_b64= line and the image build receives BUILD_ENV_B64.
  • After deploy, confirm the client bundle has the Supabase URL, publishable key, Turnstile site key, and PostHog token/host.
  • Confirm login, Supabase calls, and PostHog still work without those five variables set on the running ECS task.
  • Confirm DATABASE_URL, SUPABASE_SERVICE_ROLE_KEY, LOGIN_TURNSTILE_SECRET_KEY, and the resume/SES secrets are still injected at runtime.

HangYeung1 and others added 3 commits August 7, 2026 16:23
The heredoc delimiter was glued onto the base64 value because base64 -w0 does not emit a trailing newline.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@HangYeung1
HangYeung1 marked this pull request as ready for review September 24, 2026 21:03
@HangYeung1
HangYeung1 requested a review from arnavs-0 September 24, 2026 21:03

@arnavs-0 arnavs-0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small but make sure to change docs to reflect

@HangYeung1

Copy link
Copy Markdown
Contributor Author

good shout

Co-authored-by: Cursor <cursoragent@cursor.com>
@HangYeung1

Copy link
Copy Markdown
Contributor Author

Updated the docs to match this change.

docs/remote-development.md now splits app connection into build-time NEXT_PUBLIC_* values (GitHub Actions secrets → BUILD_ENV_B64 → .env.production.local) and runtime secrets that stay on the ECS task via SSM. The ownership table in docs/development.md points at the same split.

@HangYeung1
HangYeung1 merged commit 55c7d56 into main Sep 25, 2026
1 check passed
@HangYeung1
HangYeung1 deleted the fix/public-env branch September 25, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix docker env import for next_public_*

2 participants