Skip to content

Alchemy deployment setups#490

Open
ryanbas21 wants to merge 2 commits into
mainfrom
alchemy-deployment-setups
Open

Alchemy deployment setups#490
ryanbas21 wants to merge 2 commits into
mainfrom
alchemy-deployment-setups

Conversation

@ryanbas21
Copy link
Copy Markdown
Contributor

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.

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.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

⚠️ No Changeset found

Latest commit: 50bb60c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant