Skip to content

Commit 20ced17

Browse files
committed
add:auto-generated OG images
1 parent 7c27d8f commit 20ced17

351 files changed

Lines changed: 677 additions & 139 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/quickstart.mdx renamed to apps/docs/content/quickstart/quickstart-going-further.mdx

Lines changed: 13 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,17 @@
11
---
2-
title: Quickstart
3-
description: Deploy a live app with a managed database and a public URL. Takes about 5 minutes.
4-
sidebar_label: Quickstart
5-
sidebar_position: 1
2+
title: Make it yours
3+
description: Swap the recipe for your own code, deploy the feedback app, and connect GitHub for auto-deploy.
4+
sidebar_label: Make it yours
5+
sidebar_class_name: hidden
6+
slug: /quickstart/quickstart-going-further
7+
unlisted: true
8+
custom_edit_url: null
69
---
710

811
import Tabs from '@theme/Tabs';
912
import TabItem from '@theme/TabItem';
10-
import Video from '@site/src/components/Video';
11-
import Image from '/src/components/Image';
1213

13-
In the next 5 minutes, we'll go from zero to a live app: a managed database, a public URL, and auto-deploy on every git push, all set up for you.
14-
15-
Here's what we're building together: a page with a button that says **"I followed the Zerops quickstart"**. Every developer who finishes this guide and clicks it gets added to the wall. It's a real app, Express backend, PostgreSQL database, static frontend, running entirely on **Zerops**.
16-
17-
Curious what you'll end up with? Here it is, live: [app-25be-3000.prg1.zerops.app](https://app-25be-3000.prg1.zerops.app/)
18-
19-
<Video
20-
src="/vids/quickstart-app.webm"
21-
type="video/webm"
22-
/>
23-
24-
:::tip Before we start
25-
Sign up at [app.zerops.io](https://app.zerops.io). You get $15 in promo credits on signup, no credit card needed. Verify your account with a $10 payment and get an additional $50, bringing your total to $65 in credits. A simple app with a database costs roughly $3-5/month, so credits go a long way.
26-
:::
27-
28-
---
29-
30-
## 1. Deploy the recipe
31-
32-
Go to [app.zerops.io/recipes](https://app.zerops.io/recipes). No account needed, the recipes page works even when you're not logged in.
33-
34-
For this guide, find and click **Node.js**. You'll see **Node.js Hello World**, a Node.js app with Express connected to a PostgreSQL database.
35-
36-
Hit **Deploy nodejs-hello-world-small-prod**. If you're not signed in yet, Zerops creates your account and kicks off the deploy in the same step.
37-
38-
<figure style={{ textAlign: 'center', margin: '1rem 0' }}>
39-
<Image
40-
lightImage="/img/screenshots/recipe-predeploy-breakdown.png"
41-
alt="Recipe pre-deploy breakdown showing services, resource sizes and exact price"
42-
style={{ width: '50%', maxWidth: '480px', height: 'auto' }}
43-
/>
44-
</figure>
45-
46-
:::info What's a recipe?
47-
A recipe is a working app with infrastructure already configured: managed database, environment variables, `zerops.yaml`, everything connected. It's a correct starting point, not a finished product.
48-
:::
49-
50-
---
51-
52-
## 2. Watch it build
53-
54-
After hitting Deploy, you'll land on the dashboard. On the right side you'll see a pipeline already running.
55-
56-
It goes through these steps in real time:
57-
58-
1. Initializing build container
59-
2. Running build commands from `zerops.yaml`
60-
3. Creating app version and upgrading service
61-
4. Done
62-
63-
![Pipeline running on the dashboard](/img/screenshots/pipeline-running-dashboard.png)
64-
65-
:::tip Good to know
66-
The build container is **temporary and free**. Zerops spins it up, runs your build, saves the output, and deletes it. You're only billed for the running app.
67-
:::
68-
69-
Once the pipeline finishes, your app is live.
70-
71-
---
72-
73-
## 3. See what got created
74-
75-
Click into your new project. You'll see:
76-
77-
- **app**: your Node.js service, already running
78-
- **db**: a managed PostgreSQL database, already running
79-
- **Project core**: load balancer, firewall, logger, all managed by Zerops
80-
81-
All of these are already talking to each other on a private network. Nothing to configure.
82-
![Project dashboard showing the app and db services running side by side](/img/screenshots/project-services-overview.png)
83-
84-
---
85-
86-
## 4. Open your live app
87-
88-
The Zerops subdomain is already enabled when you deploy from a recipe. Click into your **app** service and open the URL.
89-
90-
The default recipe app will be there.
91-
92-
When you're ready for production, point a custom domain at your app. Zerops handles the SSL certificate automatically.
93-
94-
---
95-
96-
## You're live 🎉
97-
98-
Here's what's running:
99-
100-
- A real app on production infrastructure
101-
- A managed PostgreSQL database with no setup, no connection strings, no SDK
102-
- All services on a private network, secure by default
103-
- Full Linux containers you can SSH into and install anything on
104-
105-
None of the infrastructure needed manual configuration.
106-
107-
:::note Stuck?
108-
Jump into the [Zerops Discord](https://docs.zerops.io/discord). The community is active and the team is there.
109-
:::
110-
111-
---
112-
113-
## Going further: make it yours
114-
115-
The guided part ends here. Everything below is for when you're ready to swap this recipe for your own code, the feedback app we showed you at the top, or whatever you're building.
14+
The guided part ends here. Everything below is for when you're ready to swap this recipe for your own code, the feedback app we showed you in the quickstart, or whatever you're building.
11615

11716
### Deploy the feedback app
11817

@@ -403,8 +302,6 @@ export default app;
403302
avatarsEl.appendChild(av);
404303
405304
if (animate) {
406-
// Force a reflow so the browser registers the initial (hidden) state
407-
// before we add the class that triggers the transition.
408305
void av.offsetWidth;
409306
requestAnimationFrame(() => {
410307
av.classList.add('visible');
@@ -508,9 +405,7 @@ You can also trigger deploys manually with the Zerops CLI: `zcli push`.
508405

509406
### Add yourself to the list
510407

511-
Followed this tutorial and deployed your app?
512-
513-
Open our live app URL and click **"I followed the Zerops quickstart"**. You'll show up alongside everyone else who's made it through.
408+
Deployed the feedback app? Open your live app URL and click **"I followed the Zerops quickstart"**. You'll show up alongside everyone else who's made it through.
514409

515410
Check out everyone who's already made it: [app-25be-3000.prg1.zerops.app](https://app-25be-3000.prg1.zerops.app/)
516411

@@ -558,3 +453,7 @@ Install zcli first (see [CLI reference](/references/cli)), then run `zcli vpn up
558453
- **[Autoscaling](/features/scaling)**: set min and max CPU and RAM, Zerops scales within that range automatically
559454
- **[Add more services](/features/infrastructure)**: queues, search engines, object storage, just add them to your project
560455
- **[Try ZCP](/zcp/quickstart)**: Zerops' AI agent that can deploy, debug, and operate your project
456+
457+
:::note Stuck?
458+
Jump into the [Zerops Discord](https://docs.zerops.io/discord). The community is active and the team is there.
459+
:::
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
title: Quickstart
3+
description: Deploy a live app with a managed database and a public URL. Takes about 5 minutes.
4+
sidebar_label: Quickstart
5+
sidebar_position: 1
6+
custom_edit_url: null
7+
---
8+
9+
import Tabs from '@theme/Tabs';
10+
import TabItem from '@theme/TabItem';
11+
import Video from '@site/src/components/Video';
12+
import Image from '/src/components/Image';
13+
14+
In the next 5 minutes, we'll go from zero to a live app: a managed database, a public URL, and auto-deploy on every git push, all set up for you.
15+
16+
Here's what we're building together: a page with a button that says **"I followed the Zerops quickstart"**. Every developer who finishes this guide and clicks it gets added to the wall. It's a real app, Express backend, PostgreSQL database, static frontend, running entirely on **Zerops**.
17+
18+
Curious what you'll end up with? Here it is, live: [app-25be-3000.prg1.zerops.app](https://app-25be-3000.prg1.zerops.app/)
19+
20+
<Video
21+
src="/vids/quickstart-app.webm"
22+
type="video/webm"
23+
/>
24+
25+
:::tip Before we start
26+
Sign up at [app.zerops.io](https://app.zerops.io). You get $15 in promo credits on signup, no credit card needed. Verify your account with a $10 payment and get an additional $50, bringing your total to $65 in credits. A simple app with a database costs roughly $3-5/month, so credits go a long way.
27+
:::
28+
29+
---
30+
31+
## 1. Deploy the recipe
32+
33+
Go to [app.zerops.io/recipes](https://app.zerops.io/recipes). No account needed, the recipes page works even when you're not logged in.
34+
35+
For this guide, find and click **Node.js**. You'll see **Node.js Hello World**, a Node.js app with Express connected to a PostgreSQL database.
36+
37+
Hit **Deploy nodejs-hello-world-small-prod**. If you're not signed in yet, Zerops creates your account and kicks off the deploy in the same step.
38+
39+
<figure style={{ textAlign: 'center', margin: '1rem 0' }}>
40+
<Image
41+
lightImage="/img/screenshots/recipe-predeploy-breakdown.png"
42+
alt="Recipe pre-deploy breakdown showing services, resource sizes and exact price"
43+
style={{ width: '50%', maxWidth: '480px', height: 'auto' }}
44+
/>
45+
</figure>
46+
47+
:::info What's a recipe?
48+
A recipe is a working app with infrastructure already configured: managed database, environment variables, `zerops.yaml`, everything connected. It's a correct starting point, not a finished product.
49+
:::
50+
51+
---
52+
53+
## 2. Watch it build
54+
55+
After hitting Deploy, you'll land on the dashboard. On the right side you'll see a pipeline already running.
56+
57+
It goes through these steps in real time:
58+
59+
1. Initializing build container
60+
2. Running build commands from `zerops.yaml`
61+
3. Creating app version and upgrading service
62+
4. Done
63+
64+
![Pipeline running on the dashboard](/img/screenshots/pipeline-running-dashboard.png)
65+
66+
:::tip Good to know
67+
The build container is **temporary and free**. Zerops spins it up, runs your build, saves the output, and deletes it. You're only billed for the running app.
68+
:::
69+
70+
Once the pipeline finishes, your app is live.
71+
72+
---
73+
74+
## 3. See what got created
75+
76+
Click into your new project. You'll see:
77+
78+
- **app**: your Node.js service, already running
79+
- **db**: a managed PostgreSQL database, already running
80+
- **Project core**: load balancer, firewall, logger, all managed by Zerops
81+
82+
All of these are already talking to each other on a private network. Nothing to configure.
83+
![Project dashboard showing the app and db services running side by side](/img/screenshots/project-services-overview.png)
84+
85+
---
86+
87+
## 4. Open your live app
88+
89+
The Zerops subdomain is already enabled when you deploy from a recipe. Click into your **app** service and open the URL.
90+
91+
The default recipe app will be there.
92+
93+
When you're ready for production, point a custom domain at your app. Zerops handles the SSL certificate automatically.
94+
95+
---
96+
97+
## You're live 🎉
98+
99+
Here's what's running:
100+
101+
- A real app on production infrastructure
102+
- A managed PostgreSQL database with no setup, no connection strings, no SDK
103+
- All services on a private network, secure by default
104+
- Full Linux containers you can SSH into and install anything on
105+
106+
None of the infrastructure needed manual configuration.
107+
108+
:::note Stuck?
109+
Jump into the [Zerops Discord](https://docs.zerops.io/discord). The community is active and the team is there.
110+
:::
111+
112+
---
113+
114+
Ready to swap the recipe for your own code or deploy the feedback app we showed you at the top? [Make it yours →](/quickstart/quickstart-going-further)

apps/docs/docusaurus.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const config = {
3131
],
3232
plugins: [
3333
'./src/plugins/markdown-source',
34+
'./src/plugins/og-images',
3435
require.resolve("docusaurus-plugin-image-zoom"),
3536
async function tailwindPlugin() {
3637
return {

apps/docs/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"lint": "eslint --ext .js,.jsx,.ts,.tsx . --fix",
1818
"lint:content": "eslint --no-eslintrc -c .content.eslintrc.js content --fix",
1919
"diagram2code:generate": "docusaurus diagram2code:generate",
20+
"generate:og": "tsx scripts/generate-og.ts",
2021
"test": "node --test src/plugins/markdown-source/__tests__/*.test.js"
2122
},
2223
"dependencies": {
@@ -40,13 +41,13 @@
4041
"eslint": "^8.49.0",
4142
"eslint-config-docs": "*",
4243
"file-loader": "^6.2.0",
44+
"jspdf": "^2.5.2",
4345
"lodash": "^4.17.21",
4446
"mdast-util-mdx": "^3.0.0",
4547
"meilisearch-docsearch": "^0.6.0",
4648
"postcss": "^8.4.21",
4749
"prism-react-renderer": "^2.3.0",
4850
"react": "^18.2.0",
49-
"jspdf": "^2.5.2",
5051
"react-dom": "^18.2.0",
5152
"react-tooltip": "5.7.4",
5253
"react-transition-group": "^4.4.5",
@@ -73,13 +74,15 @@
7374
"@docusaurus/module-type-aliases": "3.4.0",
7475
"@docusaurus/tsconfig": "3.4.0",
7576
"@docusaurus/types": "3.4.0",
77+
"@resvg/resvg-js": "^2.6.2",
7678
"@types/react": "^18.2.0",
7779
"@types/react-dom": "^18.2.0",
7880
"@types/react-transition-group": "^4.4.6",
81+
"satori": "^0.12.2",
7982
"swc-loader": "^0.2.3",
8083
"typescript": "~5.2.2"
8184
},
8285
"engines": {
8386
"node": ">=18.0"
8487
}
85-
}
88+
}

0 commit comments

Comments
 (0)