diff --git a/content/0.index.yml b/content/0.index.yml index 525979308..1fe4e1620 100644 --- a/content/0.index.yml +++ b/content/0.index.yml @@ -190,6 +190,15 @@ sections: - src: /assets/integrations/netlify.svg alt: Netlify to: /deploy/netlify + - src: /assets/integrations/koyeb.svg + alt: Koyeb + to: /deploy/koyeb + - src: /assets/integrations/zeabur.svg + alt: zeabur + to: /deploy/zeabur + - src: /assets/integrations/zerops.svg + alt: zerops + to: /deploy/zerops - src: /assets/integrations/tailwind.svg alt: Tailwind CSS to: /modules/tailwindcss diff --git a/content/3.deploy/zerops.md b/content/3.deploy/zerops.md new file mode 100644 index 000000000..507542d25 --- /dev/null +++ b/content/3.deploy/zerops.md @@ -0,0 +1,127 @@ +--- +title: Zerops +description: "Deploy your Nuxt Application to Zerops infrastructure." +componentImg: Zerops +logoSrc: "/assets/integrations/zerops.svg" +category: Hosting +NuxtPreset: "zerops" +website: "https://zerops.io" +--- + +**Nodejs Preset**: `SERVER_PRESET: zerops` +**Static Preset**: `SERVER_PRESET: zerops-static` + +:read-more{title="Zerops" to="https://zerops.io"} + +::tip +**Nuxt x Zerops Quickrun ✨** +:br + Want to test running Nuxt on Zerops without installing or setting up anything? Using repositories [Zerops x Nuxt - Static](https://github.com/zeropsio/recipe-nuxt-static) or [Zerops x Nuxt - SSR on Node.js](https://github.com/zeropsio/recipe-nuxt-nodejs) you can deploy example Nuxt app with a single click. +:: + + +Zerops supports deploying both static and server-side rendered apps with a simple configuration file in your project root. + +## Static + +Projects and services can be added either through a [Project add wizard](https://app.zerops.io/dashboard/project-add) or imported using a YAML structure: + +### Creating a Project + +```yml [zerops-project-import.yml] +project: + name: recipe-nuxt + +services: + - hostname: app + type: static +``` +This will create a project called `recipe-nuxt` with a Zerops Static service called `app`. + +### Setting up Zerops YAML + +To tell Zerops how to build and run your app, add a `zerops.yml` to your root: + +```yml [zerops.yml] +zerops: + - setup: app + build: + base: nodejs@20 + buildCommands: + - yarn + - yarn nuxi generate + deployFiles: + - .output/public/~ + run: + base: static +``` + +Now you can trigger the [build & deploy pipeline using the Zerops CLI](#building-deploying-your-app) 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. + +## SSR Node.js + +Projects and services can be added either through a [Project add wizard](https://app.zerops.io/dashboard/project-add) or imported using a YAML structure: + +```yml [zerops-project-import.yml] +project: + name: recipe-nuxt + +services: + - hostname: app + type: nodejs@20 +``` + +This will create a project called `recipe-nuxt` with a Zerops Static service called `app`. + +### Setting up Zerops YAML + +To tell Zerops how to build and run your app, add a `zerops.yml` to your root: + +```yml [zerops.yml] +zerops: + - setup: nuxt + build: + base: nodejs@18 + prepareCommands: + - node -v + buildCommands: + - yarn + - yarn build + deployFiles: + - .output/~ + run: + base: nodejs@18 + ports: + - port: 3000 + httpSupport: true + start: node server/index.mjs +``` + +Now you can trigger the [build & deploy pipeline using the Zerops CLI](#building-deploying-your-app) 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. + + +## Building & Deploying your App + +- Install the [Zerops CLI](https://github.com/zeropsio/zcli). +```sh +npm i -g @zerops/zcli +``` + +- Open [Settings > Access Token Management](https://app.zerops.io/settings/token-management) in the Zerops app and generate a new access token. + +- Log in using your access token with the following command: + +```sh +zcli login +``` + +- Navigate to the root of your app (where `zerops.yml` is located) and run the following command to trigger the deploy: + +```sh +zcli push +``` + +Your code can be deployed automatically on each commit or a new tag by connecting the service with your [GitHub](https://docs.zerops.io/references/gitlab-integration) / [GitLab](https://docs.zerops.io/references/gitlab-integration) repository. This connection can be set up in the service detail. + + +:read-more{title="Zerops Documentation" to="https://docs.zerops.io/"} diff --git a/content/4.templates.yml b/content/4.templates.yml index 8593cde5c..ed47fc63a 100644 --- a/content/4.templates.yml +++ b/content/4.templates.yml @@ -57,11 +57,11 @@ templates: description: 'Легкий шаблон Nuxt для сайта, работающего в формате Markdown.' repo: 'atinux/content-wind' demo: 'https://content-wind.nuxt.space' - - name: 'Super SaaS' + - name: 'SuperSaaS' slug: 'supersaas' - description: 'The dashboard system that makes you say WOW.' + description: 'Nuxt 3 Fullstack Starter Kit with Auth, DB, Payment, Files & Emails' demo: 'https://supersaas.dev/?aff=J0Emk' - purchase: 'https://store.supersaas.dev/?aff=J0Emk' + purchase: 'https://supersaas.dev/?aff=J0Emk' badge: 'Premium' - name: 'Tairo' slug: 'tairo' diff --git a/nuxt.config.ts b/nuxt.config.ts index 8f0fac76c..d547faeb3 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -7,8 +7,7 @@ function normalizedDirPath(path?: string) { return path } - const windowsPath = path.replace(/\\/g, '/') - return windowsPath.startsWith('file:///') ? windowsPath : `file:///${windowsPath}` + return path.replace(/\\/g, '/') } const docsSourceBase = normalizedDirPath(process.env.NUXT_DOCS_PATH) diff --git a/public/assets/integrations/zerops.svg b/public/assets/integrations/zerops.svg new file mode 100644 index 000000000..cdf27c92b --- /dev/null +++ b/public/assets/integrations/zerops.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + +