feat(infra): keep self-hosted deploy state local - #124
Merged
Merged
Conversation
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.
The self-hosted deploy only creates Docker resources on the target server, but it kept Alchemy's deploy state in the Cloudflare state store, so it needed Cloudflare credentials. It now uses Alchemy's local state (
.alchemy/in the checkout, already gitignored). The Cloudflare stack is unchanged.Decision
State lives in the checkout you deploy from. Deploy, redeploy, and destroy from that same checkout; a different clone doesn't know the container exists (a second deploy would collide on the container name, and destroy would find nothing). The user docs say this in one line and no longer list Cloudflare credentials as a prerequisite.
Try it
With no
CLOUDFLARE_*variables set:Expected:
Done: 3 succeeded,.alchemy/stateappears in the checkout, the container turns healthy, andcurl 127.0.0.1:8080/api/datasetson the server lists the datasets.bun run destroy:self-hosted --stage testfrom the same checkout removes it.Verification
/api/datasetsreturned the dataset, and the dashboard rendered charts over the sample range.bun run format,bun run lint,bun run typecheckpass.