denoland / denoland/deploy_feedback
Web Console: Provide option for `root` in the Runtime Configuration settings
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### What problem are you trying to solve?
[Nitro](https://v3.nitro.build/) based apps (like Nuxt, TanStackStart, SolidStart etc) produce build output in the `.output` folder.
For such apps to work on deno deploy the `root` must be set to `.output`, otherwise resulting in issues with serving static files (even if the server starts up just fine).
Using the framework-preset for Nuxt is great, since I gather that sets the root to `.output`, but fails if the nitro build is configured with the `deno-deploy` preset since that produces a `server/index.ts` file rather than a `server/index.mjs` files as entrypoint.
Being able to manually set a `root` in the settings via the web interface (as it is already possible to do when manually creating a `deployctl` github action) would enable many deploys to use the "connected" github repo variant that provides such a nice DX. 🙌
In my case, trying to deploy a TanStack Start app with Nitro v3, I could make this work today by:
- using nitro preset `node-server` since that produces the entrypoint `.output/index.mjs`
- using the Nuxt framework preset
this does feel rather backward though.
### Describe the solution you'd like
An opt-in field to manually set a `root` for the runtime configuration would be fantastic.
This would (probably) enable many build systems and outputs without having to create a custom build script for deno deploy or manually set up the github action.
One more input field here, below Entrypoint, would do the trick:
### Describe alternatives you've considered
- custom build script that moves files into root folder before starting
- custom github action with a `root` option for `deployctl` set to `.output`
- using the Nuxt framework preset and building with Nitro-preset `node-server`, even though I'm not deploying a Nuxt app or aiming to run as a node-server
### Documentation, Adoption, Migration Strategy
It would be an opt-in configuration, available only when needed and so should not require any changes for all current set-ups.
Documentation wise it would be nice to provide (I'd be happy to help and contribute):
- information on that customizing the CWD/root is possibel, and that it would affect the value entered in the Entrypoint-field since that has to be relative to what `root`is set to.
- a section on Nitro-based apps and how to get them running in general, especially since they provide deno-deploy presets that natively use Deno.serve in the generated `index.ts` file.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.