@korajs/cli 0.1.15 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,6 +51,55 @@ kora migrate
51
51
  # Detects changes, generates migration file, prompts to apply
52
52
  ```
53
53
 
54
+ ### kora deploy
55
+
56
+ Deploy your Kora app to a cloud platform with a single command:
57
+
58
+ ```bash
59
+ kora deploy
60
+ ```
61
+
62
+ Supported platforms: **Fly.io**, **Railway** (Render, Docker, Kora Cloud coming soon).
63
+
64
+ #### Options
65
+
66
+ | Flag | Description |
67
+ |------|-------------|
68
+ | `--platform` | Target platform: `fly`, `railway`, `render`, `docker`, `kora-cloud` |
69
+ | `--app` | Application name on the platform |
70
+ | `--region` | Deployment region (e.g., `iad`, `lhr`, `syd`) |
71
+ | `--prod` | Deploy to production environment (default: preview) |
72
+ | `--confirm` | Non-interactive mode — fail fast if required data is missing |
73
+ | `--reset` | Delete `.kora/deploy/` state and generated artifacts |
74
+
75
+ #### Subcommands
76
+
77
+ ```bash
78
+ kora deploy status # Show deployment health, URLs, and metadata
79
+ kora deploy logs # View recent deployment logs
80
+ kora deploy rollback # Revert to the previous deployment
81
+ ```
82
+
83
+ #### Non-interactive (CI/CD)
84
+
85
+ ```bash
86
+ kora deploy --platform=fly --app=my-app --region=iad --confirm
87
+ ```
88
+
89
+ #### What it does
90
+
91
+ 1. Generates a `Dockerfile` and `.dockerignore` in `.kora/deploy/`
92
+ 2. Bundles your server entry (`server.ts`) with esbuild into a single file
93
+ 3. Builds your client with Vite
94
+ 4. Generates platform config (`fly.toml` or `railway.json`)
95
+ 5. Provisions the app on the platform (creates it if new)
96
+ 6. Deploys and returns your live URL and sync WebSocket endpoint
97
+
98
+ #### Prerequisites
99
+
100
+ - **Fly.io**: Install [flyctl](https://fly.io/docs/hands-on/install-flyctl/) and run `fly auth login`
101
+ - **Railway**: Install [@railway/cli](https://docs.railway.com/guides/cli) and run `railway login`
102
+
54
103
  ### kora generate types
55
104
 
56
105
  Generate TypeScript types from your schema: