Skip to content

universal-deploy/full

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 

Repository files navigation

Full Universal Deploy

Zero-config deep integration between Vite apps and deployment providers.

Contents

Goal

Extend Universal Deploy: deeper integration between Vite apps and deployment — support features like SPA fallback, async jobs, ...

Everything stays zero-config: Vite apps can be deployed out-of-the-box with minimal config.

Note

Vite

We're currently focusing on the Vite ecosystem — supporting other bundlers is a long-term goal but not a short-term priority.

Static hosting

Support for:

  • URL rewrites — use cases:
    • SPA fallback (e.g. serve dist/client/product/index.html for all URLs /product/:id, i.e. /product/42, /product/1337, ...)
    • 404 page (serve dist/client/404/index.html as a catch-all fallback)
  • URL redirects

Note

Marketing

It's a quick-win for a deployment provider to position itself as the best solution for hosting static websites. Vike (and others) will, accordingly, recommend its users to use such deployment provider. It's an effective way to earn trust and popularity amongst users.

Note

Implementation

Universal Deploy has been developed with such features in mind — implementation is relatively easy.

Async jobs

How can the user define async tasks, queues, and cron jobs in a way that works across many (and eventually most) deployment providers?

Note

Implementation

The implementation itself is relatively easy — this is mostly about research to find a (new?) standard syntax. For example, whether we can use the UNIX cron syntax as the standard syntax.

CLI

CLI integration:

  • $ vite deploy logs => server logs
  • $ vite deploy status => deployment status, downtime status for past 30 days, ...
  • $ vite deploy ls => number of server processes, system metrics (CPU usage, mem usage), pending tasks, ...
  • $ vite deploy db => connect to DB and run queries, e.g. SELECT { title, release_date } FROM movies;
    • $ vite deploy db migrate => run migrations
  • $ vite secrets => manage production environment variables (e.g. DB_PASSWORD)
    # Set a secret
    $ vite deploy secrets set DB_PASSWORD lOK9uiUuCP75lMzQ
    # Get all secrets
    $ vite deploy secrets list

Note

Motivation: AI

AI cannot (practically) work with UIs — the CLI enables AI to access deployment data (such as deployment logs for debugging).

Note

Implementation

  • At first, we implement $ vike deploy instead of $ vite deploy
  • We talk to the Vite team about adding $ vite deploy to Vite's CLI:
    • The Vite team has repeatedly shown interest in having Vite plugins be able to extend Vite's CLI (e.g. for further enabling frameworks to be "just Vite plugins")
    • We're currently working with the Vite team on Vite deployment plugins. Having $ vite deploy is a natural next step.

AI

How will deployment providers integrate with AI workflows in the future?

Example:

  • Error detected in deployment => AI is automatically prompted => AI can access deployment logs => AI proposes fix => human review => fix is merged & deployed
  • Only human intervention is reviewing the bug fix, everything else is automatic

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors