Alchemy deployment setups#490
Open
ryanbas21 wants to merge 2 commits into
Open
Conversation
Customers shouldn't have to learn alchemy as a separate CLI just to ship
the login app. ping-lf already owns the project lifecycle, so it owns the
deploy step too. The deploy command is a thin alias that runs
"pnpm run <script>" inside the template the customer picked at init time,
keeping each template's pinned alchemy version load-bearing.
init --deploy-target=<docker|cloudflare|aws|none> picks the template
up-front (or prompts interactively when omitted), copies it into deploy/,
and writes .ping-lf/config.json so the alias knows which template to
invoke. The deploy folder joins the customer's pnpm workspace so the
template's deps install alongside the app.
Also fixes a pre-existing bug from the original CLI commit where
createRequire('../package.json') resolved to dist/package.json instead of
the package root, making --version and the binary itself unrunnable.
|
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.
Rought idea that I need to spend some more time on, to add a deploy script to the CLI.
This uses https://v2.alchemy.run/getting-started/ to write "run" files which describe how to deploy to a given infrastructure.
It allows us to use local dev with docker, and then deploy the same images to AWS / Cloudflare workers.
If the company grants me cloudflare access, I can use the *.workers.dev domain we have (all cloudflare orgs get this free domain) to use it to deploy preview environments with alchemy to cloudflare workers.
The basics of this is, that you write a basic effect that describes to how to deploy. Alchemy has OOB providers you can "provide" to the effect like Cloudflare workers, AWS, lambdas, and because its just an Effect service, you can write your own.
I spoke with Liv, and we don't think we can use this for our infrastructure but we can use this to offer a quick deployment setup for users.