feat(infra): plumb BUSCASAM_DOCENTE_EMAIL_ALLOWLIST to prod#162
Merged
Conversation
The docente email-allowlist setting (ADR-0005 item 17, backend shipped in v1.4.3) had no path to the running container: compose passes an explicit environment: map (no env_file) and startup.sh assembles .env from a fixed list — neither referenced the new var, so it was a silent no-op in prod. Wire it end to end: - compose.yaml &backend_env: BUSCASAM_DOCENTE_EMAIL_ALLOWLIST passthrough - startup.sh .env heredoc: emit it from a new template var - app-vm + root `docente_email_allowlist` tf variable (default "", so a no-op until set) threaded into the templatefile call - .env.example: document the knob Value is set per-env via the gitignored terraform.tfvars; empty disables the override. Survives reboots (startup.sh) and redeploys (compose from config.tgz). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Wires the docente email-allowlist setting (ADR-0005 item 17; backend code shipped in v1.4.3) through to the running prod container. It was previously un-plumbed, so setting it had no effect.
Why it was a no-op
compose.yamlpasses containers an explicitenvironment:map (noenv_file), and it didn't listBUSCASAM_DOCENTE_EMAIL_ALLOWLIST.startup.shassembles the VM's.envfrom a fixed heredoc that also didn't include it.So the var never reached the api container regardless of
.env.Changes
infra/compose.yamlBUSCASAM_DOCENTE_EMAIL_ALLOWLIST: ${BUSCASAM_DOCENTE_EMAIL_ALLOWLIST:-}in&backend_env(shared with workers)infra/terraform/modules/app-vm/startup.sh.envfrom a template varinfra/terraform/modules/app-vm/main.tfdocente_email_allowlistinto thetemplatefilecallinfra/terraform/modules/app-vm/variables.tf+variables.tf(root) +main.tf(module wiring)docente_email_allowlisttf variable, default""infra/.env.exampleDefault is
""→ no-op until set. The value is provided per-env via the gitignoredterraform.tfvars(not in this PR).Verification
terraform fmt -check -recursive: cleanterraform validate: SuccessDeploy sequence (after merge)
compose.yaml(references the var).docente_email_allowlist = "achaval.lucas@gmail.com"interraform.tfvars,terraform apply(in-place VM metadata update)..env(VM reboot regenerates.envviastartup.sh, or a one-time.envline +apirestart).🤖 Generated with Claude Code