-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor: Zerops deployment guide (#781)
- Loading branch information
1 parent
ab12c15
commit 799f768
Showing
5 changed files
with
185 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
"netlify.mdx", | ||
"railway.mdx", | ||
"vercel.mdx", | ||
"stormkit.mdx" | ||
"stormkit.mdx", | ||
"zerops.mdx" | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
--- | ||
title: Zerops | ||
order: 7 | ||
mainNavExclude: true | ||
--- | ||
|
||
import { TabsCodeBlocks } from "~/ui/tab-code-blocks"; | ||
|
||
[Zerops](https://zerops.io) is a dev-first cloud platform that can be used to deploy both Static and SSR Solid Node.js Apps. | ||
|
||
For additional one-to-one support, details, and features, you can join the [Zerops Discord server](https://discord.gg/xxzmJSDKPT) and [visit the Zerops Docs](https://docs.zerops.io). | ||
|
||
Deploy and test Zerops Solid recipes with one click: | ||
- [Deploy Solid Node.js & Static Together](https://app.zerops.io/recipe/solidjs) - [Node.js](https://github.com/zeropsio/recipe-solidjs-nodejs) and [Static](https://github.com/zeropsio/recipe-solidjs-static). | ||
- [Deploy Solid Node.js](https://app.zerops.io/recipe/solidjs-nodejs) - [Source Repository](https://github.com/zeropsio/recipe-solidjs-nodejs) | ||
- [Deploy Solid Static](https://app.zerops.io/recipe/solidjs-static) - [Source Repository](https://github.com/zeropsio/recipe-solidjs-static) | ||
|
||
## Setting up an Account on Zerops | ||
|
||
1. Go to [Zerops Registration](https://app.zerops.io/registration) and sign up using GitHub, GitLab, or just your email. | ||
|
||
## Setting up your Project Infrastructure | ||
|
||
There are two ways to set up a Zerops project and a service: | ||
|
||
#### Using Project Add Wizard (GUI) | ||
|
||
1. Go to your [Zerops dashboard](https://app.zerops.io/dashboard/projects). | ||
2. Add a new project using your sidebar. If you're in compact mode, click on your profile and then "Add new project." | ||
3. You'll be redirected to a page where you can choose a service. | ||
|
||
##### For Static: | ||
1. Choose Static. | ||
2. Scroll down and change the hostname to your preference. | ||
3. Scroll down and click on the "Add New Static" button. | ||
|
||
##### For SSR - Node.js: | ||
1. Choose `Node.js` and select `version 20`. | ||
2. Scroll down and change the hostname to your preference. | ||
3. Scroll down and click on the "Add New Node.js" button. | ||
|
||
#### Using Project Import YAML | ||
|
||
**Note**: This is only used for project creation using YAML on the web interface—no need to add it to the project. | ||
|
||
1. Go to your [Zerops dashboard](https://app.zerops.io/dashboard/projects) and click on your profile icon if you are a new user. If not, check your sidebar and click on `Import Project`. | ||
|
||
##### Static: | ||
```yaml | ||
project: | ||
name: recipe-solidjs | ||
|
||
services: | ||
- hostname: app | ||
type: static | ||
enableSubdomainAccess: true | ||
``` | ||
##### SSR - Node.js: | ||
```yaml | ||
project: | ||
name: recipe-solidjs | ||
|
||
services: | ||
- hostname: app | ||
type: nodejs@20 | ||
enableSubdomainAccess: true | ||
``` | ||
## Add zerops.yml to your repository | ||
The `zerops.yml` configuration file is used to tell Zerops how to build and run your application, it should be placed to the root of your appplication's repository. | ||
|
||
Example for **SSR (Server-Side Rendering)** Apps: | ||
|
||
Set up the `zerops.yml` file in the root of your SSR project. Make sure the setup parameter's value is the same as the hostname of the service. | ||
|
||
```yaml | ||
zerops: | ||
- setup: app | ||
build: | ||
base: nodejs@latest | ||
buildCommands: | ||
- pnpm i | ||
- pnpm build | ||
deployFiles: | ||
- .output | ||
- node_modules | ||
- public | ||
- package.json | ||
run: | ||
base: nodejs@latest | ||
ports: | ||
- port: 3000 | ||
httpSupport: true | ||
start: pnpm start | ||
``` | ||
|
||
Example for **SSG (Static Site Generation)** Apps: | ||
|
||
Set up the `zerops.yml` file in the root of your SSG project. Make sure the setup parameter's value is the same as the hostname of the service. | ||
|
||
```yaml | ||
zerops: | ||
- setup: app | ||
build: | ||
base: nodejs@latest | ||
buildCommands: | ||
- pnpm i | ||
- pnpm build | ||
deployFiles: | ||
- dist/~ | ||
run: | ||
base: static | ||
``` | ||
Push the changes to your GitHub/GitLab repository (necessary if you are planning to use GitHub/GitLab). | ||
|
||
## Deploying your apps | ||
|
||
### Triggering the pipeline automatically by connecting Github/Gitlab repository | ||
You can push your project by [Triggering the pipeline using Zerops CLI](#triggering-the-pipeline-using-githubgitlab) or by connecting the app service with your [GitHub](https://docs.zerops.io/references/github-integration/) / [GitLab](https://docs.zerops.io/references/gitlab-integration) repository from inside the service detail. | ||
|
||
|
||
|
||
### Triggering the pipeline manually using Zerops CLI | ||
|
||
To download the zCLI binary directly, use [zCLI/releases](https://github.com/zeropsio/zcli/releases) or: | ||
1. Install the Zerops CLI using Terminal. | ||
|
||
Linux/MacOS | ||
|
||
```bash | ||
curl -L https://zerops.io/zcli/install.sh | sh | ||
``` | ||
|
||
Windows | ||
|
||
```powershell | ||
irm https://zerops.io/zcli/install.ps1 | iex | ||
``` | ||
|
||
Npm | ||
<TabsCodeBlocks> | ||
<div id="npm"> | ||
```bash frame="none" | ||
npm i -g @zerops/zcli | ||
``` | ||
</div> | ||
<div id="pnpm"> | ||
```bash frame="none" | ||
pnpm add -g @zerops/zcli | ||
``` | ||
</div> | ||
<div id="yarn"> | ||
```bash frame="none" | ||
yarn global add @zerops/zcli | ||
``` | ||
</div> | ||
</TabsCodeBlocks> | ||
|
||
2. Open Settings > [Access Token Management](https://app.zerops.io/settings/token-management) in the Zerops app and generate a new access token. | ||
3. Log in using your access token with the following command: | ||
```bash | ||
zcli login <token> | ||
``` | ||
4. Navigate to the root of your app (where zerops.yml is located) and run the following command in Terminal to trigger the deploy: | ||
```bash | ||
zcli push | ||
``` | ||
|
||
Check the official docs if you need more advanced use-cases for [Zerops Docs](http://docs.zerops.io/). |
This file contains 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