Skip to content

Commit 799f768

Browse files
authored
Minor: Zerops deployment guide (#781)
1 parent ab12c15 commit 799f768

File tree

5 files changed

+185
-2
lines changed

5 files changed

+185
-2
lines changed

public/assets/zerops.svg

Lines changed: 7 additions & 0 deletions
Loading

src/routes/guides/deploying-your-app.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Are you ready to deploy your Solid application? Follow our guides for different
3030
href="/guides/deployment-options/netlify"
3131
logo="netlify"
3232
/>
33-
<div />
3433
<ImageLinks
3534
title="Railway"
3635
href="/guides/deployment-options/railway"
@@ -49,4 +48,9 @@ Are you ready to deploy your Solid application? Follow our guides for different
4948
logo="stormkit"
5049
/>
5150

51+
<ImageLinks
52+
title="Zerops"
53+
href="/guides/deployment-options/zerops"
54+
logo="zerops"
55+
/>
5256
</div>

src/routes/guides/deployment-options/data.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"netlify.mdx",
88
"railway.mdx",
99
"vercel.mdx",
10-
"stormkit.mdx"
10+
"stormkit.mdx",
11+
"zerops.mdx"
1112
]
1213
}
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
title: Zerops
3+
order: 7
4+
mainNavExclude: true
5+
---
6+
7+
import { TabsCodeBlocks } from "~/ui/tab-code-blocks";
8+
9+
[Zerops](https://zerops.io) is a dev-first cloud platform that can be used to deploy both Static and SSR Solid Node.js Apps.
10+
11+
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).
12+
13+
Deploy and test Zerops Solid recipes with one click:
14+
- [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).
15+
- [Deploy Solid Node.js](https://app.zerops.io/recipe/solidjs-nodejs) - [Source Repository](https://github.com/zeropsio/recipe-solidjs-nodejs)
16+
- [Deploy Solid Static](https://app.zerops.io/recipe/solidjs-static) - [Source Repository](https://github.com/zeropsio/recipe-solidjs-static)
17+
18+
## Setting up an Account on Zerops
19+
20+
1. Go to [Zerops Registration](https://app.zerops.io/registration) and sign up using GitHub, GitLab, or just your email.
21+
22+
## Setting up your Project Infrastructure
23+
24+
There are two ways to set up a Zerops project and a service:
25+
26+
#### Using Project Add Wizard (GUI)
27+
28+
1. Go to your [Zerops dashboard](https://app.zerops.io/dashboard/projects).
29+
2. Add a new project using your sidebar. If you're in compact mode, click on your profile and then "Add new project."
30+
3. You'll be redirected to a page where you can choose a service.
31+
32+
##### For Static:
33+
1. Choose Static.
34+
2. Scroll down and change the hostname to your preference.
35+
3. Scroll down and click on the "Add New Static" button.
36+
37+
##### For SSR - Node.js:
38+
1. Choose `Node.js` and select `version 20`.
39+
2. Scroll down and change the hostname to your preference.
40+
3. Scroll down and click on the "Add New Node.js" button.
41+
42+
#### Using Project Import YAML
43+
44+
**Note**: This is only used for project creation using YAML on the web interface—no need to add it to the project.
45+
46+
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`.
47+
48+
##### Static:
49+
```yaml
50+
project:
51+
name: recipe-solidjs
52+
53+
services:
54+
- hostname: app
55+
type: static
56+
enableSubdomainAccess: true
57+
```
58+
59+
##### SSR - Node.js:
60+
```yaml
61+
project:
62+
name: recipe-solidjs
63+
64+
services:
65+
- hostname: app
66+
type: nodejs@20
67+
enableSubdomainAccess: true
68+
```
69+
70+
## Add zerops.yml to your repository
71+
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.
72+
73+
Example for **SSR (Server-Side Rendering)** Apps:
74+
75+
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.
76+
77+
```yaml
78+
zerops:
79+
- setup: app
80+
build:
81+
base: nodejs@latest
82+
buildCommands:
83+
- pnpm i
84+
- pnpm build
85+
deployFiles:
86+
- .output
87+
- node_modules
88+
- public
89+
- package.json
90+
run:
91+
base: nodejs@latest
92+
ports:
93+
- port: 3000
94+
httpSupport: true
95+
start: pnpm start
96+
```
97+
98+
Example for **SSG (Static Site Generation)** Apps:
99+
100+
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.
101+
102+
```yaml
103+
zerops:
104+
- setup: app
105+
build:
106+
base: nodejs@latest
107+
buildCommands:
108+
- pnpm i
109+
- pnpm build
110+
deployFiles:
111+
- dist/~
112+
run:
113+
base: static
114+
```
115+
Push the changes to your GitHub/GitLab repository (necessary if you are planning to use GitHub/GitLab).
116+
117+
## Deploying your apps
118+
119+
### Triggering the pipeline automatically by connecting Github/Gitlab repository
120+
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.
121+
122+
123+
124+
### Triggering the pipeline manually using Zerops CLI
125+
126+
To download the zCLI binary directly, use [zCLI/releases](https://github.com/zeropsio/zcli/releases) or:
127+
1. Install the Zerops CLI using Terminal.
128+
129+
Linux/MacOS
130+
131+
```bash
132+
curl -L https://zerops.io/zcli/install.sh | sh
133+
```
134+
135+
Windows
136+
137+
```powershell
138+
irm https://zerops.io/zcli/install.ps1 | iex
139+
```
140+
141+
Npm
142+
<TabsCodeBlocks>
143+
<div id="npm">
144+
```bash frame="none"
145+
npm i -g @zerops/zcli
146+
```
147+
</div>
148+
<div id="pnpm">
149+
```bash frame="none"
150+
pnpm add -g @zerops/zcli
151+
```
152+
</div>
153+
<div id="yarn">
154+
```bash frame="none"
155+
yarn global add @zerops/zcli
156+
```
157+
</div>
158+
</TabsCodeBlocks>
159+
160+
2. Open Settings > [Access Token Management](https://app.zerops.io/settings/token-management) in the Zerops app and generate a new access token.
161+
3. Log in using your access token with the following command:
162+
```bash
163+
zcli login <token>
164+
```
165+
4. Navigate to the root of your app (where zerops.yml is located) and run the following command in Terminal to trigger the deploy:
166+
```bash
167+
zcli push
168+
```
169+
170+
Check the official docs if you need more advanced use-cases for [Zerops Docs](http://docs.zerops.io/).

src/ui/image-links.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const logos: { [key: string]: { file: string; style?: string } } = {
1313
netlify: { file: "netlify.svg" },
1414
railway: { file: "railway.svg" },
1515
vercel: { file: "vercel.svg" },
16+
zerops: {file: "zerops.svg"},
1617
sass: { file: "sass.svg" },
1718
less: { file: "less.svg" },
1819
cssmodules: { file: "css-modules.svg", style: "invert" },

0 commit comments

Comments
 (0)