diff --git a/apps/docs/.content.eslintrc.js b/apps/docs/.content.eslintrc.js index ba67e1f06..be776f64c 100644 --- a/apps/docs/.content.eslintrc.js +++ b/apps/docs/.content.eslintrc.js @@ -1,4 +1,9 @@ module.exports = { root: true, extends: ['docs/content'], + rules: { + 'quotes': ['error', 'single'], + 'semi': ['error', 'always'], + 'max-len': ['error', { code: 80, ignoreComments: true }] + } }; diff --git a/apps/docs/content/bun/faq.mdx b/apps/docs/content/bun/faq.mdx deleted file mode 100644 index 7f57f37b2..000000000 --- a/apps/docs/content/bun/faq.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Frequently Asked Questions -description: Get quick answers to your related questions about Bun from frequently asked questions by people at Zerops. ---- - -import { FAQ, FAQItem } from '/src/components/Faq'; - - - sample answer - diff --git a/apps/docs/content/bun/how-to/access.mdx b/apps/docs/content/bun/how-to/access.mdx index 0a80def10..52b36040f 100644 --- a/apps/docs/content/bun/how-to/access.mdx +++ b/apps/docs/content/bun/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Bun service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Bun service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Bun service is not publicly accessible. When your application i ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](bun/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](bun/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/bun/how-to/build-pipeline.mdx b/apps/docs/content/bun/how-to/build-pipeline.mdx index deacb4926..777f27537 100644 --- a/apps/docs/content/bun/how-to/build-pipeline.mdx +++ b/apps/docs/content/bun/how-to/build-pipeline.mdx @@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your Bun application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -78,9 +78,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -105,7 +105,7 @@ Following options are available for Bun builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -124,12 +124,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -143,7 +143,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customise your build environment use the [prepareCommands](bun/how-to/build-pipeline#preparecommands) attribute. @@ -188,7 +188,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -229,7 +229,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -257,7 +257,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml buildCommands: - | bun i @@ -268,7 +268,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml buildCommands: - bun i - bun run build @@ -278,7 +278,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](bun/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the --verbose option. -```yml +```yaml buildCommands: - bun i --verbose - bun run build @@ -290,7 +290,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -301,7 +301,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -309,7 +309,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - dist - package.json @@ -317,13 +317,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -335,19 +335,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -366,7 +366,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -393,7 +393,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -411,7 +411,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -442,7 +442,7 @@ Following options are available for Bun runtimes: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -465,12 +465,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -490,7 +490,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customise your build environment use the `prepareCommands` attribute. @@ -540,7 +540,7 @@ _OPTIONAL._ Customises the Bun runtime environment by installing additional depe additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -594,14 +594,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -613,13 +613,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -659,7 +659,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -680,7 +680,7 @@ Read more about [environment variables](bun/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Bun application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -716,7 +716,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -749,7 +749,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -778,7 +778,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -817,7 +817,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -850,7 +850,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/bun/how-to/build-process.mdx b/apps/docs/content/bun/how-to/build-process.mdx index be0926962..73f749aad 100644 --- a/apps/docs/content/bun/how-to/build-process.mdx +++ b/apps/docs/content/bun/how-to/build-process.mdx @@ -54,11 +54,11 @@ The build cancellation is available before the build pipeline is finished. When The default Bun build environment contains: - {data.alpine.default} -- selected version of Bun defined in `zerops.yml` [build.base](bun/how-to/build-pipeline#base) parameter +- selected version of Bun defined in `zerops.yaml` [build.base](bun/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/bun/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](bun/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/bun/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](bun/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`. :::info The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file). @@ -104,7 +104,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](bun/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](bun/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbose` option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build diff --git a/apps/docs/content/bun/how-to/create.mdx b/apps/docs/content/bun/how-to/create.mdx index f5e37ca01..f0bcf7d9a 100644 --- a/apps/docs/content/bun/how-to/create.mdx +++ b/apps/docs/content/bun/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a powerful Bun runtime service with extensive build support. The Bun runtime is highly scalable and customizable to suit your development and production needs. With just a few clicks or commands, you can have a production-ready Bun environment up and running in no time. @@ -86,11 +87,7 @@ You can choose the CPU mode when starting a new service or change it later. The Vertical auto scaling has the following default configuration: -|   | Minimum resource | Maximum resource | -| ------------- | ---------------- | ---------------- | -| **CPU cores** | 1 | 5 | -| **RAM** | 0.25 GB | 32 GB | -| **Disk** | 1 GB | 100 GB | + Bun services always start with the minimal resources. @@ -165,7 +162,7 @@ Zerops uses a YAML format to describe the project infrastructure. #### Basic example: -Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yml` file with the following content: +Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yaml` file with the following content: ```yaml # basic project data project: @@ -187,7 +184,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Bun version 20 service with default [auto scaling](bun/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](bun/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Bun version 20 service with default [auto scaling](bun/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](bun/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -196,7 +193,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -245,7 +242,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Bun service and a [PostgreSQL](/postgresql/overview) service. -Bun service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yml](bun/how-to/build-pipeline#ports). Bun service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Bun service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yaml](bun/how-to/build-pipeline#ports). Bun service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -254,7 +251,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -264,7 +261,7 @@ The `project:` section is required. Only one project can be defined. | **description** | **Optional.** Description of the new project. | Maximum 255 characters. | | **tags** | **Optional.** One or more string tags. Tags do not have a functional meaning, they only provide better orientation in projects. | -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Bun and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Bun and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -294,7 +291,7 @@ At least one service in `services:` section is required. You can create a projec @@ -375,9 +372,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [Bun service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Bun service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -390,11 +387,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -410,7 +407,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -440,9 +437,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -456,4 +453,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/bun/how-to/customize-runtime.mdx b/apps/docs/content/bun/how-to/customize-runtime.mdx index fe0905f32..50d49e1da 100644 --- a/apps/docs/content/bun/how-to/customize-runtime.mdx +++ b/apps/docs/content/bun/how-to/customize-runtime.mdx @@ -24,7 +24,7 @@ The default Bun runtime environment contains: , Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/bun/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/bun/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yaml`. When the first deploy with a defined `prepareCommands` attribute is triggered, Zerops will diff --git a/apps/docs/content/bun/how-to/deploy-process.mdx b/apps/docs/content/bun/how-to/deploy-process.mdx index 712030c3d..87d08994a 100644 --- a/apps/docs/content/bun/how-to/deploy-process.mdx +++ b/apps/docs/content/bun/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](bun/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](bun/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](bun/how-to/build-pipeline#start), configure a [readiness check](bun/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](bun/how-to/build-pipeline#start), configure a [readiness check](bun/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/bun/how-to/env-variables.mdx b/apps/docs/content/bun/how-to/env-variables.mdx index 042988a97..6784cc556 100644 --- a/apps/docs/content/bun/how-to/env-variables.mdx +++ b/apps/docs/content/bun/how-to/env-variables.mdx @@ -13,19 +13,19 @@ There are 3 different sets of env variables in Zerops: | environment | type | defined in | | ----------- | ------ | --------------------------------------------------------------------------------- | -| build | basic | [zerops.yml](bun/how-to/build-pipeline#envvariables) | -| runtime | basic | [zerops.yml](bun/how-to/build-pipeline#envvariables-1) | +| build | basic | [zerops.yaml](bun/how-to/build-pipeline#envvariables) | +| runtime | basic | [zerops.yaml](bun/how-to/build-pipeline#envvariables-1) | | runtime | secret | [Zerops GUI](bun/how-to/env-variables#set-secret-env-variables-in-zerops-gui) | Use the [secret env variables](bun/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](bun/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](bun/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

Bun service always starts with the minimal resources. @@ -185,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/bun/how-to/shared-storage.mdx b/apps/docs/content/bun/how-to/shared-storage.mdx index 4618022aa..cd3ea9c77 100644 --- a/apps/docs/content/bun/how-to/shared-storage.mdx +++ b/apps/docs/content/bun/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Bun service via the comman Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](bun/how-to/create#create-a-project-description-file) how to define the Bun service using the description.yml. +[Read the basics](bun/how-to/create#create-a-project-description-file) how to define the Bun service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Bun service and a shared storage -Follow the article [How to create a project based on the description.yml](bun/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](bun/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/bun/how-to/trigger-pipeline.mdx b/apps/docs/content/bun/how-to/trigger-pipeline.mdx index 6a0d303a0..8d887008f 100644 --- a/apps/docs/content/bun/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/bun/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](bun/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](bun/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](bun/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](bun/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](bun/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](bun/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/bun/how-to/upgrade.mdx b/apps/docs/content/bun/how-to/upgrade.mdx index 8778ed5dc..5ed789cbe 100644 --- a/apps/docs/content/bun/how-to/upgrade.mdx +++ b/apps/docs/content/bun/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Bun version description: Learn how to upgrade your node.js service's version --- -You can upgrade or downgrade your Bun service to a different major Bun version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](bun/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Bun version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Bun version for your runtime. +You can upgrade or downgrade your Bun service to a different major Bun version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](bun/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Bun version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Bun version for your runtime. -If you want to build your application with a different major Bun version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Bun version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/bun/overview.mdx b/apps/docs/content/bun/overview.mdx index 25e5949a6..5cecee14e 100644 --- a/apps/docs/content/bun/overview.mdx +++ b/apps/docs/content/bun/overview.mdx @@ -25,9 +25,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-bun/blob/main/zerops-project-import.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-bun/blob/main/zerops-project-import.yaml)): -```yml +```yaml project: name: recipe-bun tags: @@ -116,12 +116,12 @@ It doesn't matter whether it's your first curious introduction to Zerops, you ha }, { type: 'link', - href: 'bun/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'Zerops.yml', + href: 'bun/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'Zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -172,7 +172,7 @@ Have you build something that others might find useful? Don't hesitate to share + + ```yaml title="zerops.yml" + run: + base: nodejs@20 + ports: + - port: 3000 + httpSupport: true + - port: 3001 + httpSupport: true + startCommands: + - command: pnpm run start:web + name: web + - command: pnpm run start:docs + name: docs + ``` + + + ```yaml title="zerops.yml" + run: + base: nodejs@20 + ports: + - port: 3000 + httpSupport: true + start: npm start + ``` + + + +:::tip Multiple Start Commands +For monorepo deployments, use `startCommands` to run multiple applications in a single service: +- Each command can have a unique name for better monitoring +- Configure multiple ports with `httpSupport` for web access +- Use a shared build process for better resource utilization +::: + +### Native Service Discovery + +Services within your project communicate seamlessly using internal hostnames: + +```env +DB_HOST: ${db_hostname} +REDIS_HOST: ${redis_hostname} +``` + +Environment variables are automatically injected and synchronized across all containers. + +### Built-in Observability + +Comprehensive monitoring and logging with zero configuration: + +- **Metrics Dashboard** - Real-time performance monitoring +- **Log Aggregation** - Centralized logging with search +- **Alert Management** - Customizable notifications +- **Service Health** - Automatic status monitoring + +### Development Tools + +Complete toolkit for modern development: + +- **CLI Tools** - Powerful command-line interface for quick operations +- **API Access** - RESTful API for workflow automation +- **Service Templates** - Pre-configured service definitions +- **Environment Management** - Secure variable handling across environments + +## Environment Consistency + +Zerops ensures consistent behavior from development to production: + +- **Configuration as Code** - Infrastructure defined in version-controlled YAML +- **Identical Environments** - Development mirrors staging mirrors production +- **Dependency Management** - Consistent runtime versions and dependencies +- **Reproducible Builds** - Deterministic build process with caching + +This consistency eliminates "works on my machine" problems and reduces deployment risks. + +## Getting Started + +Ready to experience developer-first infrastructure? Follow our [quick start guide](/getting-started) to deploy your first application on Zerops. + +:::info Need Help? +Join our [Discord community](https://discord.gg/zerops) for support and discussions with other developers. +::: + + + + + + + + + diff --git a/apps/docs/content/company/payment.mdx b/apps/docs/content/company/payment.mdx new file mode 100644 index 000000000..5dd984103 --- /dev/null +++ b/apps/docs/content/company/payment.mdx @@ -0,0 +1,102 @@ +--- +title: Top-up & Billing +description: Understanding credits, payment methods, and automatic top-ups on Zerops. +--- + +import { Dropdown, DropdownItem } from '/src/components/Dropdown'; + +Zerops provides a transparent credit-based payment system that makes managing your account finances straightforward. You can easily add funds to your account through manual or automatic top-ups, track all your transactions, and download invoices for your records. + +This page explains how to manage your account balance, set up payment preferences, and access your complete billing history to help you maintain uninterrupted service while keeping your finances organized. + +## Manual Top-up + +Manual top-ups give you direct control over your account funding. To add credits to your account immediately: + +1. Navigate to **Credit & Spend Overview** in the Organization section of the main menu +2. Click on **Top up credit** and fill in the [billing information](#billing-information) +3. Enter your desired top-up amount (minimum $10 VAT excl.) +3. Complete payment using your saved or new payment method + +## Automatic Top-ups + +:::caution Beta version +Available only for customers who have previously made a manual top-up, have a saved payment method, and have provided billing information. +::: + +Automatic top-up ensures your projects continue running without interruption by replenishing your credits when they run low. + +### How Automatic Top-ups Work + +When enabled, Zerops monitors your credit balance and consumption rate to determine when and how much to top up, always respecting your configured limits. +Zerops initiates an automatic payment when: + +- Your remaining credits are sufficient for **less than 10 days** of operation at your **current consumption rate** +- You have automatic top-ups enabled +- Your [settings](#billing-information) allow for the payment amount + +:::note Important notes +- The charge amount is estimated based on your actual usage patterns, not maximum possible amounts +- Negative balances are included in the next auto top-up (within your maximum charge limit) +- The system checks your balance immediately after enabling auto top-ups, potentially triggering an immediate payment +- Auto top-up limits don't affect manual payments — add any amount manually regardless of automatic settings +::: + +### Configuration Options + +#### Period +The timeframe for which the maximum configured auto-charge amount is checked. Can be set to either: + +- **Weekly**: Maximum charge amount applies to a 7-day rolling window +- **Monthly**: Maximum charge amount applies to a 30-day rolling window + +#### Maximum Charge Amount +The maximum amount that can be auto-charged in the given period. This serves as a safeguard against unexpected costs due to traffic spikes or other unforeseen circumstances. + +- Minimum setting: $10 (matches the minimum manual payment) + + + +**Scenario:** Application with $20 weekly operating costs and initial manual top-up of $100 + +**Your Settings:** +- Period = Weekly +- Maximum charge amount = $150 + +**Expected behavior:** +- System adds approximately $20-30 when less than 10 days of credits remain (around day 35) +- Payments continue in small increments aligned with your usage patterns +- During traffic spikes, payments adjust to match higher consumption (up to $150 weekly limit) +- Payment amounts return to normal when usage decreases +
+
+
+ +## Billing Information + +You are required to enter billing details for all transactions (manual and automatic top-ups), with one exception: + +- EU-based users who are not VAT payers with transactions under $350 + +You can save your billing details by navigating to **Invoices & Billing Settings** in the Organization section of the main menu. + +## Invoices + +Zerops provides easy access to all invoices generated for manual and automatic top-ups within your organization. + +To view and manage your invoices navigate to **Invoices & Billing Settings** in the Organization section of the main menu. + +## Export Credit Consumption Records + +Zerops allows you to download monthly reports of your credit consumption history for analysis and record-keeping. + +1. Navigate to **Credit & Spend Overview** in the Organization section +2. Find the **Export Credit Consumption Records** section +3. Click on any month button to download that period's report + +Reports are available for the past 12 months in TXT format and include: +- Client information and reporting period +- Starting and ending balances +- Itemized resource charges by project and service +- Credit transactions (top-ups, refunds, promotional credits) +- Clear distinction between common (paid) and promotional credits \ No newline at end of file diff --git a/apps/docs/content/company/pricing.mdx b/apps/docs/content/company/pricing.mdx new file mode 100644 index 000000000..a533bdcda --- /dev/null +++ b/apps/docs/content/company/pricing.mdx @@ -0,0 +1,125 @@ +--- +title: Pricing +description: Zerops pricing plans and resource costs +--- + +Zerops provides a straightforward pricing structure based on your project type and resource usage. + +The total cost of deploying an application includes your project's **core package cost** + the **cost of the resources** of the services inside a project. Additional charges may apply for optional features such as dedicated IPv4, extra egress, object storage, extra backup space and extra build time. + +:::note Fair Billing Model +Resources are allocated per service and billed by the minute, though credit is deducted hourly based on actual usage. You're only charged for what you use, calculated down to the minute. +::: + +Need to add credits to your account? Visit our [Top-up & Billing page](/company/payment) for instructions. + +## Project Core Plans + +Zerops offers two core types to match different needs and budgets. For detailed information on both core types, visit our [Project & Services Structure](/features/infrastructure) page. + +### Lightweight Core - Free +Best for development, testing, and smaller workloads with limited redundancy. + +### Serious Core - $10 / 30 days +Optimized for production workloads with high availability and comprehensive failover protection. + +## Resource Pricing + +Services in Zerops require computing resources that are billed separately from your project core. These resources are allocated per service and billed by the minute based on actual usage, with credits deducted hourly. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResourcePriceDescription
Shared CPU$0.60 per CPU / 30 daysEconomical option for most workloads with good performance
Dedicated CPU$6.00 per CPU / 30 daysReserved CPU cores for predictable performance
RAM$0.75 per 0.25 GB / 30 daysMemory allocated to your services
Disk Space$0.05 per 0.5 GB / 30 daysStorage space for your applications and data
+ +## Additional Services + +Enhance your deployment with these optional services to meet specific requirements for networking, storage, and data transfer. + + + + + + + + + + + + + + + + + + + + + +
ServicePriceDescription
Dedicated IPv4$3.00 per 30 daysExclusive IPv4 address for your project (instead of shared)
Object Storage$0.01 per GB / 30 daysScalable storage for files, backups, and static assets
+ +## Overage Costs + +When you exceed the resources included in your project core plan, the following charges apply: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ItemPriceDescription
Extra Egress$0.02 per GBData transfer out of your project beyond plan limits
Extra Backup Space$0.50 per 5 GBAdditional storage for automatic, encrypted backups
Extra Build Time$0.50 per 15 hoursAdditional time for building and deploying applications
+ +## Pricing Calculator + +Use our pricing calculator to estimate your monthly costs based on your specific needs: + +import PricingCalculator from "@site/src/components/PricingCalculator" + + \ No newline at end of file diff --git a/apps/docs/content/deno/faq.mdx b/apps/docs/content/deno/faq.mdx deleted file mode 100644 index cca7a9d9d..000000000 --- a/apps/docs/content/deno/faq.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Frequently Asked Questions -description: Get quick answers to your related questions about Deno from frequently asked questions by people at Zerops. ---- - -import { FAQ, FAQItem } from '/src/components/Faq'; - - - sample answer - diff --git a/apps/docs/content/deno/how-to/access.mdx b/apps/docs/content/deno/how-to/access.mdx index 0fde99bcc..b25d9b105 100644 --- a/apps/docs/content/deno/how-to/access.mdx +++ b/apps/docs/content/deno/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Deno service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Deno service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Deno service is not publicly accessible. When your application ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/deno/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/deno/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/deno/how-to/build-pipeline.mdx b/apps/docs/content/deno/how-to/build-pipeline.mdx index eefb5e516..b897ee570 100644 --- a/apps/docs/content/deno/how-to/build-pipeline.mdx +++ b/apps/docs/content/deno/how-to/build-pipeline.mdx @@ -8,11 +8,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your Deno application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -75,9 +75,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -102,7 +102,7 @@ Following options are available for Deno builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -119,12 +119,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -138,7 +138,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customise your build environment use the [prepareCommands](/deno/how-to/build-pipeline#preparecommands) attribute. @@ -183,7 +183,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -224,7 +224,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -251,7 +251,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml buildCommands: - | deno test @@ -262,7 +262,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml buildCommands: - deno task build ``` @@ -271,7 +271,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/deno/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the --verbose option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build @@ -283,7 +283,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -294,7 +294,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -302,7 +302,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - dist - package.json @@ -310,13 +310,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -328,19 +328,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -359,7 +359,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -386,7 +386,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -404,7 +404,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -435,7 +435,7 @@ Following options are available for Deno builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -458,12 +458,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -483,7 +483,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customise your build environment use the `prepareCommands` attribute. @@ -533,7 +533,7 @@ _OPTIONAL._ Customises the Deno runtime environment by installing additional dep additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -587,14 +587,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -606,13 +606,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -652,7 +652,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -673,7 +673,7 @@ Read more about [environment variables](/deno/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Deno application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -709,7 +709,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -742,7 +742,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -771,7 +771,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -810,7 +810,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -843,7 +843,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/deno/how-to/build-process.mdx b/apps/docs/content/deno/how-to/build-process.mdx index 6e5c2c788..5d5ce0346 100644 --- a/apps/docs/content/deno/how-to/build-process.mdx +++ b/apps/docs/content/deno/how-to/build-process.mdx @@ -54,11 +54,11 @@ The build cancellation is available before the build pipeline is finished. When The default Deno build environment contains: - {data.alpine.default} -- selected version of Deno defined in `zerops.yml` [build.base](/deno/how-to/build-pipeline#base) parameter +- selected version of Deno defined in `zerops.yaml` [build.base](/deno/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/deno/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/deno/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/deno/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/deno/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`. :::info The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file). @@ -104,7 +104,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/deno/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/deno/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbose` option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build diff --git a/apps/docs/content/deno/how-to/create.mdx b/apps/docs/content/deno/how-to/create.mdx index 40204db25..838b15e20 100644 --- a/apps/docs/content/deno/how-to/create.mdx +++ b/apps/docs/content/deno/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a powerful Deno runtime service with extensive build support. The Deno runtime is highly scalable and customizable to suit your development and production needs. With just a few clicks or commands, you can have a production-ready Deno environment up and running in no time. @@ -81,11 +82,7 @@ You can choose the CPU mode when starting a new service or change it later. The Vertical auto scaling has the following default configuration: -|   | Minimum resource | Maximum resource | -| ------------- | ---------------- | ---------------- | -| **CPU cores** | 1 | 5 | -| **RAM** | 0.25 GB | 32 GB | -| **Disk** | 1 GB | 100 GB | + Deno services always start with the minimal resources. @@ -160,7 +157,7 @@ Zerops uses a YAML format to describe the project infrastructure. #### Basic example: -Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yml` file with the following content: +Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yaml` file with the following content: ```yaml # basic project data project: @@ -182,7 +179,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Deno version 20 service with default [auto scaling](/deno/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/deno/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Deno version 20 service with default [auto scaling](/deno/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/deno/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -191,7 +188,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -240,7 +237,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Deno service and a [PostgreSQL](/postgresql/overview) service. -Deno service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yml](/deno/how-to/build-pipeline#ports). Deno service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Deno service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yaml](/deno/how-to/build-pipeline#ports). Deno service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -249,7 +246,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -259,7 +256,7 @@ The `project:` section is required. Only one project can be defined. | **description** | **Optional.** Description of the new project. | Maximum 255 characters. | | **tags** | **Optional.** One or more string tags. Tags do not have a functional meaning, they only provide better orientation in projects. | -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Deno and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Deno and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -289,7 +286,7 @@ At least one service in `services:` section is required. You can create a projec @@ -371,9 +368,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [Deno service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Deno service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -386,11 +383,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -406,7 +403,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -436,9 +433,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -452,4 +449,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/deno/how-to/customize-runtime.mdx b/apps/docs/content/deno/how-to/customize-runtime.mdx index b016f816b..f09182aea 100644 --- a/apps/docs/content/deno/how-to/customize-runtime.mdx +++ b/apps/docs/content/deno/how-to/customize-runtime.mdx @@ -24,7 +24,7 @@ The default Deno runtime environment contains: , Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/deno/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/deno/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yaml`. When the first deploy with a defined `prepareCommands` attribute is triggered, Zerops will diff --git a/apps/docs/content/deno/how-to/deploy-process.mdx b/apps/docs/content/deno/how-to/deploy-process.mdx index 863d658da..d2a03a31a 100644 --- a/apps/docs/content/deno/how-to/deploy-process.mdx +++ b/apps/docs/content/deno/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/deno/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/deno/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/deno/how-to/build-pipeline#start), configure a [readiness check](/deno/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/deno/how-to/build-pipeline#start), configure a [readiness check](/deno/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/deno/how-to/env-variables.mdx b/apps/docs/content/deno/how-to/env-variables.mdx index 95f96631f..dac863200 100644 --- a/apps/docs/content/deno/how-to/env-variables.mdx +++ b/apps/docs/content/deno/how-to/env-variables.mdx @@ -13,19 +13,19 @@ There are 3 different sets of env variables in Zerops: | environment | type | defined in | | ----------- | ------ | --------------------------------------------------------------------------------- | -| build | basic | [zerops.yml](/deno/how-to/build-pipeline#envvariables) | -| runtime | basic | [zerops.yml](/deno/how-to/build-pipeline#envvariables-1) | +| build | basic | [zerops.yaml](/deno/how-to/build-pipeline#envvariables) | +| runtime | basic | [zerops.yaml](/deno/how-to/build-pipeline#envvariables-1) | | runtime | secret | [Zerops GUI](#set-secret-env-variables-in-zerops-gui) | Use the [secret env variables](/deno/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/deno/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/deno/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

Deno service always starts with the minimal resources. @@ -185,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/deno/how-to/shared-storage.mdx b/apps/docs/content/deno/how-to/shared-storage.mdx index 72f5a0d31..1789b5c7a 100644 --- a/apps/docs/content/deno/how-to/shared-storage.mdx +++ b/apps/docs/content/deno/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Deno service via the comma Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/deno/how-to/create#create-a-project-description-file) how to define the Deno service using the description.yml. +[Read the basics](/deno/how-to/create#create-a-project-description-file) how to define the Deno service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Deno service and a shared storage -Follow the article [How to create a project based on the description.yml](/deno/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/deno/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/deno/how-to/trigger-pipeline.mdx b/apps/docs/content/deno/how-to/trigger-pipeline.mdx index b1ee59f71..200f99ebe 100644 --- a/apps/docs/content/deno/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/deno/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/deno/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/deno/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/deno/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/deno/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/deno/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/deno/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/deno/how-to/upgrade.mdx b/apps/docs/content/deno/how-to/upgrade.mdx index d0339141a..ae760d3a2 100644 --- a/apps/docs/content/deno/how-to/upgrade.mdx +++ b/apps/docs/content/deno/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Deno version description: Learn how to upgrade your deno service's version --- -You can upgrade or downgrade your Deno service to a different major Deno version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/deno/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Deno version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Deno version for your runtime. +You can upgrade or downgrade your Deno service to a different major Deno version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/deno/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Deno version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Deno version for your runtime. -If you want to build your application with a different major Deno version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Deno version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/deno/overview.mdx b/apps/docs/content/deno/overview.mdx index 886446661..f23d2ab5f 100644 --- a/apps/docs/content/deno/overview.mdx +++ b/apps/docs/content/deno/overview.mdx @@ -29,9 +29,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-deno/blob/main/zerops-project-import.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-deno/blob/main/zerops-project-import.yaml)): -```yml +```yaml project: name: recipe-deno tags: @@ -119,12 +119,12 @@ It doesn't matter whether it's your first curious introduction to Zerops, you ha }, { type: 'link', - href: '/deno/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'Zerops.yml', + href: '/deno/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'Zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -175,7 +175,7 @@ Have you build something that others might find useful? Don't hesitate to share - sample answer - diff --git a/apps/docs/content/dotnet/how-to/access.mdx b/apps/docs/content/dotnet/how-to/access.mdx index 90dd2194b..90ddd6912 100644 --- a/apps/docs/content/dotnet/how-to/access.mdx +++ b/apps/docs/content/dotnet/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your .NET service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your .NET service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your .NET service is not publicly accessible. When your application ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/dotnet/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/dotnet/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/dotnet/how-to/build-pipeline.mdx b/apps/docs/content/dotnet/how-to/build-pipeline.mdx index bc76b8526..77e2c48da 100644 --- a/apps/docs/content/dotnet/how-to/build-pipeline.mdx +++ b/apps/docs/content/dotnet/how-to/build-pipeline.mdx @@ -10,11 +10,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your .NET application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -79,9 +79,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -106,7 +106,7 @@ Following options are available for .NET builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -123,12 +123,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -142,7 +142,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customize your build environment use the [prepareCommands](/dotnet/how-to/build-pipeline#preparecommands) attribute. @@ -187,7 +187,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -228,7 +228,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -255,7 +255,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml buildCommands: - | apt-get -y install dotnet-runtime-6.0 aspnetcore-runtime-6.0 dotnet-sdk-6.0 # already installed for .NET service @@ -266,7 +266,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml buildCommands: - apt-get -y install dotnet-runtime-6.0 aspnetcore-runtime-6.0 dotnet-sdk-6.0 # already installed for .NET service - dotnet build -o app @@ -276,7 +276,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/dotnet/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbosity ` option. -```yml +```yaml buildCommands: - dotnet build --verbosity detailed ``` @@ -287,7 +287,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -296,7 +296,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -304,7 +304,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - app - file.txt @@ -312,13 +312,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -330,19 +330,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -361,7 +361,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -388,7 +388,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -406,7 +406,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -437,7 +437,7 @@ Following options are available for .NET builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -460,12 +460,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -485,7 +485,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customise your build environment use the `prepareCommands` attribute. @@ -553,7 +553,7 @@ _OPTIONAL._ Customises the .NET runtime environment by installing additional dep or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -609,14 +609,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -628,13 +628,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -674,7 +674,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -695,7 +695,7 @@ Read more about [environment variables](/dotnet/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your .NET application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -729,7 +729,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -777,7 +777,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -806,7 +806,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -845,7 +845,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -893,7 +893,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/dotnet/how-to/build-process.mdx b/apps/docs/content/dotnet/how-to/build-process.mdx index 129391230..576b6bb08 100644 --- a/apps/docs/content/dotnet/how-to/build-process.mdx +++ b/apps/docs/content/dotnet/how-to/build-process.mdx @@ -46,14 +46,14 @@ The build cancellation is available before the build pipeline is finished. When The default .NET build environment contains: - {data.alpine.default} -- selected version of .NET defined in `zerops.yml` [build.base](/dotnet/how-to/build-pipeline#base) parameter +- selected version of .NET defined in `zerops.yaml` [build.base](/dotnet/how-to/build-pipeline#base) parameter - [zCLI](/references/cli) - ASP .NET and Git :::note -To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yml/specification#os-) attribute. +To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yaml/specification#os-) attribute. -Additional packages and tools can be installed using [build.prepareCommands](/zerops-yml/specification#preparecommands-). +Additional packages and tools can be installed using [build.prepareCommands](/zerops-yaml/specification#preparecommands-). ::: :::info @@ -100,7 +100,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/dotnet/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/dotnet/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbosity ` option. -```yml +```yaml buildCommands: - dotnet build --verbosity detailed ``` diff --git a/apps/docs/content/dotnet/how-to/create.mdx b/apps/docs/content/dotnet/how-to/create.mdx index 5507f634e..6cc23b4f6 100644 --- a/apps/docs/content/dotnet/how-to/create.mdx +++ b/apps/docs/content/dotnet/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a .NET runtime service with extensive build support. .NET runtime is highly scalable and customisable to suit both development and production. @@ -81,32 +82,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
+ .NET service always starts with the minimal resources. @@ -181,7 +157,7 @@ Zerops uses a yaml format to describe the project infrastructure. #### Basic example: -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -204,7 +180,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one .NET version 6 service with default [auto scaling](/dotnet/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/dotnet/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one .NET version 6 service with default [auto scaling](/dotnet/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/dotnet/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -213,7 +189,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -262,7 +238,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a .NET service and a [PostgreSQL](/postgresql/overview) service. -.NET service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yml](/dotnet/how-to/build-pipeline#ports). .NET service will run on version 6 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +.NET service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yaml](/dotnet/how-to/build-pipeline#ports). .NET service will run on version 6 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -271,7 +247,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -303,7 +279,7 @@ The `project:` section is required. Only one project can be defined. -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains .NET and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains .NET and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -333,7 +309,7 @@ At least one service in `services:` section is required. You can create a projec @@ -397,9 +373,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version. - See what [.NET service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [.NET service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -412,11 +388,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -432,7 +408,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -462,9 +438,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -478,4 +454,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/dotnet/how-to/customize-runtime.mdx b/apps/docs/content/dotnet/how-to/customize-runtime.mdx index 583aa1cef..b43c2cc9d 100644 --- a/apps/docs/content/dotnet/how-to/customize-runtime.mdx +++ b/apps/docs/content/dotnet/how-to/customize-runtime.mdx @@ -24,9 +24,9 @@ The default .NET runtime environment contains: - ASP .NET and Git :::note -To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yml/specification#os--1) attribute. +To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yaml/specification#os--1) attribute. -Additional packages and tools can be installed using [run.prepareCommands](/zerops-yml/specification#preparecommands--1). +Additional packages and tools can be installed using [run.prepareCommands](/zerops-yaml/specification#preparecommands--1). ::: ## Runtime Flow diff --git a/apps/docs/content/dotnet/how-to/deploy-process.mdx b/apps/docs/content/dotnet/how-to/deploy-process.mdx index 500004124..b0d5a0e8b 100644 --- a/apps/docs/content/dotnet/how-to/deploy-process.mdx +++ b/apps/docs/content/dotnet/how-to/deploy-process.mdx @@ -42,7 +42,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/dotnet/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/dotnet/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -60,7 +60,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/dotnet/how-to/build-pipeline#start), configure a [readiness check](/dotnet/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/dotnet/how-to/build-pipeline#start), configure a [readiness check](/dotnet/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -96,7 +96,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/dotnet/how-to/env-variables.mdx b/apps/docs/content/dotnet/how-to/env-variables.mdx index 85ff53c9f..1febed0e0 100644 --- a/apps/docs/content/dotnet/how-to/env-variables.mdx +++ b/apps/docs/content/dotnet/how-to/env-variables.mdx @@ -25,12 +25,12 @@ There are 3 different sets of env variables in Zerops: basic build - zerops.yml + zerops.yaml basic runtime - zerops.yml + zerops.yaml secret @@ -42,13 +42,13 @@ There are 3 different sets of env variables in Zerops: Use the [secret env variables](/dotnet/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/dotnet/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/dotnet/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

- - - Resources Type - Minimum resource - Maximum resource - - - - - CPU cores - 1 - 5 - - - RAM - 0.25 GB - 32 GB - - - Disk - 1 GB - 100 GB - - - + .NET service always starts with the minimal resources. @@ -208,7 +183,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/dotnet/how-to/shared-storage.mdx b/apps/docs/content/dotnet/how-to/shared-storage.mdx index 09235375e..eb0e24d3d 100644 --- a/apps/docs/content/dotnet/how-to/shared-storage.mdx +++ b/apps/docs/content/dotnet/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new .NET service via the comma Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/dotnet/how-to/create#create-a-project-description-file) how to define the .NET service using the description.yml. +[Read the basics](/dotnet/how-to/create#create-a-project-description-file) how to define the .NET service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a .NET service and a shared storage -Follow the article [How to create a project based on the description.yml](/dotnet/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/dotnet/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/dotnet/how-to/trigger-pipeline.mdx b/apps/docs/content/dotnet/how-to/trigger-pipeline.mdx index 486f029d7..71779c29d 100644 --- a/apps/docs/content/dotnet/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/dotnet/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/dotnet/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/dotnet/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/dotnet/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/dotnet/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/dotnet/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/dotnet/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/dotnet/how-to/upgrade.mdx b/apps/docs/content/dotnet/how-to/upgrade.mdx index 62912337e..b0280676b 100644 --- a/apps/docs/content/dotnet/how-to/upgrade.mdx +++ b/apps/docs/content/dotnet/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the .NET version description: Learn how to upgrade your dotnet service's version --- -You can upgrade or downgrade your .NET service to a different major .NET version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/dotnet/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required .NET version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current .NET version for your runtime. +You can upgrade or downgrade your .NET service to a different major .NET version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/dotnet/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required .NET version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current .NET version for your runtime. -If you want to build your application with a different major .NET version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major .NET version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/dotnet/overview.mdx b/apps/docs/content/dotnet/overview.mdx index fb0ef6359..61c263d40 100644 --- a/apps/docs/content/dotnet/overview.mdx +++ b/apps/docs/content/dotnet/overview.mdx @@ -23,9 +23,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-dotnet-hello-world/blob/main/import-project/description.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-dotnet-hello-world/blob/main/import-project/description.yaml)): -```yml +```yaml project: name: my-first-project services: @@ -95,12 +95,12 @@ Do you have any questions? Check the step-by-step tutorial, browse the documenta }, { type: 'link', - href: '/dotnet/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'zerops.yml', + href: '/dotnet/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -151,7 +151,7 @@ Have you build something that others might find useful? Don't hesitate to share - sample answer - diff --git a/apps/docs/content/elixir/how-to/access.mdx b/apps/docs/content/elixir/how-to/access.mdx index 4f6ae5fa8..58b02119d 100644 --- a/apps/docs/content/elixir/how-to/access.mdx +++ b/apps/docs/content/elixir/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Elixir service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Elixir service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Elixir service is not publicly accessible. When your applicatio ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/elixir/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/elixir/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/elixir/how-to/build-pipeline.mdx b/apps/docs/content/elixir/how-to/build-pipeline.mdx index adf89714e..dd26d7a46 100644 --- a/apps/docs/content/elixir/how-to/build-pipeline.mdx +++ b/apps/docs/content/elixir/how-to/build-pipeline.mdx @@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your Elixir application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -76,9 +76,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -103,7 +103,7 @@ Following options are available for Elixir builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -120,12 +120,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -139,7 +139,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customise your build environment use the [prepareCommands](/elixir/how-to/build-pipeline#preparecommands) attribute. @@ -184,7 +184,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -225,7 +225,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -253,7 +253,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml buildCommands: - | npm i @@ -264,7 +264,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml buildCommands: - npm i - npm run build @@ -274,7 +274,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/elixir/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the --verbose option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build @@ -286,7 +286,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -297,7 +297,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -305,7 +305,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - dist - package.json @@ -313,13 +313,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -331,19 +331,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -362,7 +362,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -389,7 +389,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -407,7 +407,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -438,7 +438,7 @@ Following options are available for Elixir builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -461,12 +461,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -486,7 +486,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customise your build environment use the `prepareCommands` attribute. @@ -536,7 +536,7 @@ _OPTIONAL._ Customises the Elixir runtime environment by installing additional d additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -590,14 +590,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -609,13 +609,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -655,7 +655,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -676,7 +676,7 @@ Read more about [environment variables](/elixir/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Elixir application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -712,7 +712,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -745,7 +745,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -774,7 +774,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -813,7 +813,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -846,7 +846,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/elixir/how-to/build-process.mdx b/apps/docs/content/elixir/how-to/build-process.mdx index 1389bd7b1..642cec0f7 100644 --- a/apps/docs/content/elixir/how-to/build-process.mdx +++ b/apps/docs/content/elixir/how-to/build-process.mdx @@ -54,11 +54,11 @@ The build cancellation is available before the build pipeline is finished. When The default Elixir build environment contains: - {data.alpine.default} -- selected version of Elixir defined in `zerops.yml` [build.base](/elixir/how-to/build-pipeline#base) parameter +- selected version of Elixir defined in `zerops.yaml` [build.base](/elixir/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/elixir/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/elixir/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/elixir/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/elixir/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`. :::info The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file). @@ -104,7 +104,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/elixir/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/elixir/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbose` option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build diff --git a/apps/docs/content/elixir/how-to/create.mdx b/apps/docs/content/elixir/how-to/create.mdx index 810a3b2e9..9b1e52e26 100644 --- a/apps/docs/content/elixir/how-to/create.mdx +++ b/apps/docs/content/elixir/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a powerful Elixir runtime service with extensive build support. The Elixir runtime is highly scalable and customizable to suit your development and production needs. With just a few clicks or commands, you can have a production-ready Elixir environment up and running in no time. @@ -81,11 +82,7 @@ You can choose the CPU mode when starting a new service or change it later. The Vertical auto scaling has the following default configuration: -|   | Minimum resource | Maximum resource | -| ------------- | ---------------- | ---------------- | -| **CPU cores** | 1 | 5 | -| **RAM** | 0.25 GB | 32 GB | -| **Disk** | 1 GB | 100 GB | + Elixir services always start with the minimal resources. @@ -160,7 +157,7 @@ Zerops uses a YAML format to describe the project infrastructure. #### Basic example: -Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yml` file with the following content: +Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yaml` file with the following content: ```yaml # basic project data project: @@ -182,7 +179,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Elixir version 20 service with default [auto scaling](/elixir/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/elixir/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Elixir version 20 service with default [auto scaling](/elixir/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/elixir/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -191,7 +188,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -240,7 +237,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Elixir service and a [PostgreSQL](/postgresql/overview) service. -Elixir service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yml](/elixir/how-to/build-pipeline#ports). Elixir service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Elixir service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yaml](/elixir/how-to/build-pipeline#ports). Elixir service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -249,7 +246,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -259,7 +256,7 @@ The `project:` section is required. Only one project can be defined. | **description** | **Optional.** Description of the new project. | Maximum 255 characters. | | **tags** | **Optional.** One or more string tags. Tags do not have a functional meaning, they only provide better orientation in projects. | -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Elixir and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Elixir and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -289,7 +286,7 @@ At least one service in `services:` section is required. You can create a projec @@ -371,9 +368,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [Elixir service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Elixir service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -386,11 +383,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -406,7 +403,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -436,9 +433,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -452,4 +449,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/elixir/how-to/customize-runtime.mdx b/apps/docs/content/elixir/how-to/customize-runtime.mdx index 822c31529..cf9c8a598 100644 --- a/apps/docs/content/elixir/how-to/customize-runtime.mdx +++ b/apps/docs/content/elixir/how-to/customize-runtime.mdx @@ -24,7 +24,7 @@ The default Elixir runtime environment contains: , Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/elixir/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/elixir/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yaml`. When the first deploy with a defined `prepareCommands` attribute is triggered, Zerops will diff --git a/apps/docs/content/elixir/how-to/deploy-process.mdx b/apps/docs/content/elixir/how-to/deploy-process.mdx index 9050241b6..7636ed47e 100644 --- a/apps/docs/content/elixir/how-to/deploy-process.mdx +++ b/apps/docs/content/elixir/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/elixir/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/elixir/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/elixir/how-to/build-pipeline#start), configure a [readiness check](/elixir/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/elixir/how-to/build-pipeline#start), configure a [readiness check](/elixir/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/elixir/how-to/env-variables.mdx b/apps/docs/content/elixir/how-to/env-variables.mdx index f2858e23c..35e570a0e 100644 --- a/apps/docs/content/elixir/how-to/env-variables.mdx +++ b/apps/docs/content/elixir/how-to/env-variables.mdx @@ -13,19 +13,19 @@ There are 3 different sets of env variables in Zerops: | environment | type | defined in | | ----------- | ------ | --------------------------------------------------------------------------------- | -| build | basic | [zerops.yml](/elixir/how-to/build-pipeline#envvariables) | -| runtime | basic | [zerops.yml](/elixir/how-to/build-pipeline#envvariables-1) | +| build | basic | [zerops.yaml](/elixir/how-to/build-pipeline#envvariables) | +| runtime | basic | [zerops.yaml](/elixir/how-to/build-pipeline#envvariables-1) | | runtime | secret | [Zerops GUI](#set-secret-env-variables-in-zerops-gui) | Use the [secret env variables](/elixir/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/elixir/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/elixir/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

Elixir service always starts with the minimal resources. @@ -185,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/elixir/how-to/shared-storage.mdx b/apps/docs/content/elixir/how-to/shared-storage.mdx index 4f9804200..d4deaaba2 100644 --- a/apps/docs/content/elixir/how-to/shared-storage.mdx +++ b/apps/docs/content/elixir/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Elixir service via the com Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/elixir/how-to/create#create-a-project-description-file) how to define the Elixir service using the description.yml. +[Read the basics](/elixir/how-to/create#create-a-project-description-file) how to define the Elixir service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Elixir service and a shared storage -Follow the article [How to create a project based on the description.yml](/elixir/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/elixir/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/elixir/how-to/trigger-pipeline.mdx b/apps/docs/content/elixir/how-to/trigger-pipeline.mdx index aa64f3af5..ff5848bb4 100644 --- a/apps/docs/content/elixir/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/elixir/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/elixir/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/elixir/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/elixir/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/elixir/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/elixir/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/elixir/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/elixir/how-to/upgrade.mdx b/apps/docs/content/elixir/how-to/upgrade.mdx index e3d568c7f..e1b2790e6 100644 --- a/apps/docs/content/elixir/how-to/upgrade.mdx +++ b/apps/docs/content/elixir/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Elixir version description: Learn how to upgrade your Elixir service's version --- -You can upgrade or downgrade your Elixir service to a different major Elixir version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/elixir/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Elixir version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Elixir version for your runtime. +You can upgrade or downgrade your Elixir service to a different major Elixir version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/elixir/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Elixir version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Elixir version for your runtime. -If you want to build your application with a different major Elixir version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Elixir version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/elixir/overview.mdx b/apps/docs/content/elixir/overview.mdx index 8f828b979..ad1e10cce 100644 --- a/apps/docs/content/elixir/overview.mdx +++ b/apps/docs/content/elixir/overview.mdx @@ -25,9 +25,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-elixir/blob/main/zerops-project-import.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-elixir/blob/main/zerops-project-import.yaml)): -```yml +```yaml project: name: recipe-elixir tags: @@ -116,12 +116,12 @@ It doesn't matter whether it's your first curious introduction to Zerops, you ha }, { type: 'link', - href: '/elixir/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'Zerops.yml', + href: '/elixir/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'Zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -172,7 +172,7 @@ Have you build something that others might find useful? Don't hesitate to share

-Once enabled, Zerops assigns a unique subdomain for your application. If you've defined multiple [internal ports](/zerops-yml/specification#ports-) with HTTP support in your `zerops.yml`, each port receives its own unique `.zerops.app` subdomain. +Once enabled, Zerops assigns a unique subdomain for your application. If you've defined multiple [internal ports](/zerops-yaml/specification#ports-) with HTTP support in your `zerops.yaml`, each port receives its own unique `.zerops.app` subdomain. @@ -144,12 +144,9 @@ All settings can be modified later as your needs change. ### DNS Configuration -After setting up domain access in Zerops, update your DNS records with your domain registrar: +After setting up domain access in Zerops, you'll need to configure your DNS records with your domain registrar. -1. Add an A record pointing to your project's public IPv4 address -2. Add an AAAA record pointing to your project's public IPv6 address - -Your application will become accessible through your domain after DNS propagation (depends on your TTL settings). +For detailed instructions on DNS configuration, including specific implementation details for Cloudflare, please refer to the [DNS and Proxy Setup](/features/dns) guide. ### HTTPS Configuration @@ -176,6 +173,10 @@ When using Let's Encrypt certificates (recommended): For applications requiring direct port access or non-HTTP protocols, Zerops provides flexible port configuration options. +:::important +Currently, direct public port access is only available for runtime services and PostgreSQL databases. +::: +

Enable Firewall -

- +

\ No newline at end of file diff --git a/apps/docs/content/features/backup.mdx b/apps/docs/content/features/backup.mdx index f3e3c5620..efb28755a 100644 --- a/apps/docs/content/features/backup.mdx +++ b/apps/docs/content/features/backup.mdx @@ -8,18 +8,90 @@ Whether a service supports backups is specified on the documentation page of eac ## Frequency and volume -By default, your data is backed up automatically **every day** between 00:00:00 UTC and 01:00:00 UTC, unless you update your settings: - -### In GUI - -Following changes are available in Zerops GUI. Go to the service detail and choose **Backups List & Configuration** section in the left menu. - -- do a one-time backup of your data -- change time of your automatic backup -- turn off backing up your data completely -- view all of your backups -- download a backup -- delete a backup +By default, your data is backed up automatically **every day** between 00:00:00 UTC and 01:00:00 UTC, unless you update your settings. + +### Managing Backups in GUI + +To manage backups, go to the service detail and choose **Backups List & Configuration** section in the left menu. + +#### Configure Backup Settings + +From this section, you can: +- Do a one-time backup of your data +- Change the frequency of your automatic backups +- Turn off backing up your data completely + +

+ Backup frequency configuration +

+ +#### Backup Frequency Options + +You can configure backups with several preset schedules: +- **No backups**: Disable automatic backups (not recommended) +- **Once a day**: Daily backups at the specified time +- **Once a week**: Weekly backups on the specified day and time +- **Once a month**: Monthly backups on the specified day and time +- **Custom CRON**: Define a custom schedule using CRON syntax + +For the Custom CRON option, you can use the following syntax: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field nameAllowed values
Minute0-59
Hour0-23
Day1-31
Month1-12
Week Day0–7; both 0 and 7 represent Sunday
+ +Examples: +- `0 2 * * *` - Every day at 2:00 AM +- `0 4 * * 0` - Every Sunday at 4:00 AM +- `0 0 1 * *` - First day of every month at midnight + +#### View and Manage Backup Files + +In the same section, you can: +- View all of your backups +- Download a backup +- Delete a backup + +

+ List of backups +

### Limits diff --git a/apps/docs/content/features/build-cache.mdx b/apps/docs/content/features/build-cache.mdx index 626b189e1..72818103c 100644 --- a/apps/docs/content/features/build-cache.mdx +++ b/apps/docs/content/features/build-cache.mdx @@ -26,9 +26,9 @@ See detailed [build process lifecycle](#build-process-lifecycle). ## Configuration Guide -### Essential zerops.yml Fields +### Essential zerops.yaml Fields -The following fields in `zerops.yml` affect build cache behavior: +The following fields in `zerops.yaml` affect build cache behavior: **Direct Cache Configuration**: - `build.cache`: Explicitly defines what should be cached through paths or patterns diff --git a/apps/docs/content/features/cdn.mdx b/apps/docs/content/features/cdn.mdx new file mode 100644 index 000000000..99107b38e --- /dev/null +++ b/apps/docs/content/features/cdn.mdx @@ -0,0 +1,323 @@ +--- +title: Content Delivery Network (CDN) +description: A comprehensive guide to using Zerops CDN to deliver your content globally with minimal latency. +--- + +import Image from '/src/components/Image'; + +Zerops CDN is a global content delivery network that brings your static content closer to your users, resulting in faster load times and improved user experience. Built on Nginx and Cloudflare geo-steering technology, our CDN automatically routes users to the nearest server location based on their DNS request. + +## Key Benefits + +- **Global Reach**: Serve content from strategic locations across the world +- **Reduced Latency**: Content is delivered from the server closest to your users +- **Simple Integration**: No complex configuration required + +## Global CDN Infrastructure + +Zerops CDN operates across **6 strategic regions** to ensure your content is always delivered from a location close to your users: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RegionLocationCoverage Area
EUCZPrague, Czech RepublicPrimary European coverage + failover for all regions
DEFalkenstein, Germany
UKLondon, United KingdomUK and surrounding areas
AUSydney, AustraliaAustralia and Oceania
SGSingapore, SingaporeSoutheast Asia
CABeauharnois, CanadaNorth America
+ +### Geo-Steering Technology +Zerops CDN's geo-steering technology automatically routes users to the server location closest to them. Here's how it works: + +* **Automatic routing**: Users are directed to the optimal CDN node based on their geographic location +* **Quick failover**: The DNS TTL is set to just 30 seconds, allowing fast recovery if a node fails +* **Redundancy**: If any node becomes unavailable, Cloudflare automatically redirects traffic to the next closest node +* **Reliable backup**: The EU region serves as the ultimate fallback - if all other nodes go down, EU will always be served in DNS + +## CDN Modes and Implementation + +Zerops CDN currently supports two distinct usage modes (with a third mode coming soon), each designed for specific content delivery needs. + +### Object Storage Mode + +Perfect for efficiently delivering media files, documents, and other static assets stored in Zerops [Object Storage](/object-storage/overview) to users across different geographical regions. + +**Setup process:** +1. Create an Object Storage service or select an existing one +2. Enable the CDN option for this service +3. Set appropriate public read access policies for objects you want to serve via CDN + +**Accessing content:** +```txt +https://storage.cdn.zerops.app/your-bucket/path/to/file +``` + +:::tip +Access the storage CDN URL via the `storageCdnUrl` **project** environment variable `${storageCdnUrl}/your-bucket/path/to/file`. +::: + +### Static Mode + +Ideal for caching and delivering static website assets like HTML, CSS, JavaScript, and images served from your custom domains. + +**Setup process:** +1. Configure domain access for your service +2. Ensure your domains are DNS-verified and have active SSL certificates +3. Enable CDN for the domain group + +**Accessing content:** +```txt +https://static.cdn.zerops.app/your-domain.com/path/to/file +``` + +:::tip +Access the static CDN URL via the `staticCdnUrl` **project** environment variable `${staticCdnUrl}/your-domain.com/path/to/file`. +::: + +:::warning Wildcard Domains Not Supported +Static CDN cannot be activated for wildcard domains (e.g., *.example.com). You must use specific domain names. +::: + +### API Mode *(Coming Soon)* + +Designed for caching API responses to reduce load on your backend services and deliver faster responses to clients. + +**Environment variable:** Once available, you'll be able to access the API CDN URL via the `apiCdnUrl` **project** environment variable. + +:::warning +API Mode is currently under development and will be available in a future release. +::: + +### HTML Implementation Examples + +Here's how to integrate CDN URLs in your HTML code: + +```html + + + + + + + + + + + + + + + + +``` + +### Testing Specific CDN Nodes + +For testing or debugging purposes, you can bypass the automatic geo-steering and access a specific CDN node directly: + +``` +https://{region}-{mode}.cdn.zerops.app/path/to/content +``` + +Available region prefixes: `cz`, `de`, `au`, `sg`, `uk`, and `ca` + +**Examples:** +- Test Australia node: `https://au-storage.cdn.zerops.app/my-bucket/test.jpg` +- Test UK node: `https://uk-static.cdn.zerops.app/my-domain.com/index.html` + +## Managing CDN Content + +### Cache Lifecycle + +Content served through Zerops CDN follows this lifecycle: + +1. **First Request**: When a user requests content not yet in the CDN cache, the request goes to the origin server (your Zerops service), and the response is cached at the CDN node +2. **Subsequent Requests**: Further requests for the same content are served directly from the CDN cache, reducing latency and origin server load +3. **Cache Expiration**: By default, content remains cached for 30 days unless explicitly purged +4. **Automatic Management**: When CDN storage reaches capacity, the least recently used content is automatically removed + +:::note Important Cache Behavior +Zerops CDN implements a fixed 30-day TTL policy. Currently, HTTP caching headers such as `Cache-Control`, `Expires`, `Pragma`, etc. do not influence CDN caching behavior. To refresh content sooner than the 30-day period, use the [purge API](#api-reference). + +Your `Cache-Control` headers will still affect browser caching behavior. +::: + +### When to Purge Cache + +You should consider purging cached content when: + +- **Content Updates**: You've updated content but kept the same URL (e.g., updated images, CSS files) +- **Deployment Rollouts**: You've deployed a new version of your application +- **Emergency Removal**: You need to immediately remove content that was accidentally made public +- **Testing Changes**: You want to ensure users see the latest version during testing + +### Purging Cached Content + +Zerops provides multiple ways to manage and purge cached content before its normal expiration: + +- **Command Line**: Use the `zsc cdn purge` [command](/references/zsc#cdn) available in all Zerops containers: + ```sh + # Purge all content for a domain + zsc cdn purge example.com + # Purge all content (wildcard) + zsc cdn purge example.com "/*" + # Purge specific file + zsc cdn purge example.com "/path/to/my-file$" + ``` + + :::important + - This command must be executed in any container within the project that has the CDN-enabled domain active + - Currently only works for [Static Mode](#static-mode) CDN + ::: + +- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). Here are ready-to-use curl examples for quickly purging content in your scripts: + + ```sh + # Static mode: Purge all content for a domain + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/project/$PROJECT_ID/purge-cdn/static/$DOMAIN/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` + + ```sh + # Storage mode: Purge all content for object storage + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/service-stack/$OBJECT_STORAGE_SERVICE_ID/purge-cdn/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` + +#### Purge Pattern Examples + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PatternDescriptionExample
`/*`Purges all contentUseful after major updates
`/images/*`Purges all content in a directoryClear all cached images
`/css/main.css$`Purges a specific fileUpdate a single CSS file
`/2023*`Purges content starting with patternClear content with date prefix
+ +:::warning Pattern Rules +- Wildcards (`*`) must be at the end of the pattern +- Specific files must include `$` at the end +- Nested wildcards (e.g., `/dir/*.jpg`) are not supported +::: + +## API Reference + +Zerops provides a comprehensive set of API endpoints to manage your CDN configuration and content. For complete information about base URLs, authorization, and general API usage, please refer to our [API specification](/references/api). + +The endpoint links below will take you to the Swagger documentation with detailed request/response schemas and examples: + +### CDN Management API + +- **[Enable CDN for Storage ↗](https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicServiceStack/EnableStorageCdn)** `PUT /api/rest/public/service-stack/{id}/cdn` +- **[Disable CDN for Storage ↗](https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicServiceStack/DisableStorageCdn)** `DELETE /api/rest/public/service-stack/{id}/cdn` +- **[Create Object Storage with CDN ↗](https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicServiceStackObjectStorage/CreateObjectStorageV1)** `POST /api/rest/public/service-stack/object_storage_v1` +- **[Create Domain Routing with CDN ↗](https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicPublicHttpRouting/CreatePublicHttpRouting)** `POST /api/public/public-http-routing` +- **[Update Domain Routing with CDN ↗](https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicPublicHttpRouting/UpdatePublicHttpRouting)** `PUT /api/public/public-http-routing/{id}` + +### Cache Purge API + +- **[Purge Storage Mode Cache ↗](https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicServiceStack/PurgeStorageCdn)** `PUT /api/rest/public/service-stack/{id}/purge-cdn/{path}` +- **[Purge Static Mode Cache ↗](https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicProject/PurgeStaticCdn)** `PUT /api/rest/public/project/{id}/purge-cdn/static/{domain}/{path}` +- **Purge Api Mode Cache *(Coming soon)*** {/*(https://api.app-prg1.zerops.io/api/rest/public/swagger/#/PublicProject/PurgeApiCdn)** `PUT /api/rest/public/project/{id}/purge-cdn/api/{domain}/{path}` */} + +## Troubleshooting + +Having issues with your CDN? Here are solutions to the most common problems: + +#### Content Not Updated After Changes +* **Issue:** You've updated content, but users still see the old version. +* **Possible Cause:** The CDN cache is continuing to serve the previously cached version. +* **Solution:** + - Use the [purge API](#api-reference) with the specific content path + - For immediate changes, use versioned file names (e.g., `style.v2.css` instead of just `style.css`) + +#### Content Not Being Cached +* **Issue:** Your content isn't being cached by the CDN. +* **Possible Cause:** Missing public read permissions on objects. +* **Solution:** + - For object storage: Check bucket and object access policies + - Verify the object is accessible directly before attempting CDN access + +:::note +Remember that only publicly accessible objects will be cached by the CDN. Private objects will always be fetched directly from the origin. +::: + +#### Environment Variables Not Available +* **Issue:** You can't access the new CDN-related project level environment variables in your containers. +* **Possible Cause:** When new environment variables are created, existing services need to be restarted to access them. Services created before the CDN feature release require special handling. +* **Solution:** + - For services created after CDN release: Restart the service to apply the new environment variables + - For services created before CDN release: Add and then remove a dummy environment variable in the project settings adn restart the service + +#### Unexpected 404 Errors +* **Issue:** Users receive 404 errors when accessing content via CDN. +* **Possible Cause:** Incorrect CDN URL formatting or missing content at origin. +* **Solution:** + - Double-check your [URL structure](#) (pay attention to domain names and paths) + - Verify content exists at the origin before attempting CDN access + - Test accessing the content directly from origin first + +**Correct URL patterns:** +- Object Storage: `https://storage.cdn.zerops.app/your-bucket/path/to/file` +- Static Mode: `https://static.cdn.zerops.app/your-domain.com/path/to/file` + +--- + +*Need help implementing CDN in your project? Join our [Discord community](https://discord.gg/zeropsio) where our team and other Zerops users can assist you!* \ No newline at end of file diff --git a/apps/docs/content/features/dns.mdx b/apps/docs/content/features/dns.mdx new file mode 100644 index 000000000..d37c5f26f --- /dev/null +++ b/apps/docs/content/features/dns.mdx @@ -0,0 +1,245 @@ +--- +title: DNS and Proxy Configuration Guide +desc: A comprehensive guide for configuring DNS records and proxy settings with Zerops applications, including shared and dedicated IPv4 setups, wildcard domains, certificate validation, and troubleshooting tips. +--- + +This guide will show you how to configure DNS records and proxy settings to work with your Zerops applications, with specific implementation details for Cloudflare. + +## DNS Configuration + +DNS records for Zerops services can be configured in two main ways: +* **With Proxy**: Routes traffic through proxy services, providing additional security and performance features (recommended for DDoS protection) +* **Without Proxy (DNS Only)**: Direct connection to your Zerops service's IP address + +DNS allows you to set two records based on IP address type: +* **A** record for **IPv4** - Zerops offers either a free **shared** IPv4 or a paid **dedicated** IPv4 +* **AAAA** record for **IPv6** - Zerops provides a free **dedicated** IPv6 + +### With Proxy + +#### IPv6 only +```bash +Type Name Content Proxy status TTL +AAAA Proxied Auto +``` + +:::note +Make sure your proxy service supports IPv4 to IPv6 translation for this configuration to work for **both IPv4 and IPv6** users. + +Do not add a proxied A record with shared IPv4 - doing so would prevent the proxy from properly routing IPv4 traffic to your service. +::: + +#### Dedicated IPv4 +```bash +Type Name Content Proxy status TTL +A Proxied Auto +# Optional +AAAA Proxied Auto +``` + +:::tip +Adding also AAAA record can be beneficial as visitors with IPv6 support will connect directly via IPv6. +::: + +#### Shared IPv4 *(valid but NOT recommended)* +```bash +Type Name Content Proxy status TTL +AAAA DNS only Auto +A Proxied Auto +``` + +:::tip Why not? +It does not make sense to expose your IPv6 address while proxying the shared IPv4. Use [IPv6 only](#ipv6-only) setup instead. +::: + +### Without Proxy + +#### Shared IPv4 +```bash +Type Name Content Proxy status TTL +AAAA DNS only Auto +A DNS only Auto +``` + +:::note Both A + AAAA Required +Adding AAAA record is essential for shared IPv4 configuration as it serves as a [security measure](#understand-shared-ipv4) to prevent unauthorized domain claims. +::: + +#### Dedicated IPv4 +```bash +Type Name Content Proxy status TTL +A DNS only Auto +# Optional +AAAA DNS only Auto +``` + +:::tip +Adding also AAAA record can be beneficial as visitors with IPv6 support will connect directly via IPv6. +::: + +#### IPv6 only +```bash +Type Name Content Proxy status TTL +AAAA DNS only Auto +``` + +:::note +This configuration will only work for users with IPv6 connectivity, which may limit your service accessibility. +::: + +## Wildcard Domain Configuration + +Zerops supports wildcard domains (`*.`) that allow routing all subdomains to your project. + +### DNS Configuration +#### Method A: Direct configuration of A and AAAA records +Configure wildcard DNS records following the same patterns described in the [DNS Configuration](#dns-configuration) section, using `*.` in the Name field: + +```bash +Type Name Content Proxy status TTL +A *. DNS only/Proxied Auto +AAAA *. DNS only/Proxied Auto +``` + +#### Method B: Using a CNAME record +First configure A and AAAA records for your main domain (``), then set up a CNAME record: + +```bash +Type Name Content Proxy status TTL +CNAME *. DNS only/Proxied Auto +``` + +### Certificate Validation + +For proper HTTPS certificate functionality with wildcard domains, configure: +```bash +Type Name Content Proxy status TTL +CNAME _acme-challenge. .zerops.zone DNS only Auto +``` + +This record enables Zerops to issue and verify a wildcard certificate for your domain. + +### Higher-Level Wildcard Subdomains + +You can also set up higher-level wildcard subdomains like `*..`: + +#### Method A: Direct configuration +```bash +Type Name Content Proxy status TTL +A *.. DNS only/Proxied Auto +AAAA *.. DNS only/Proxied Auto +``` + +#### Method B: Using a CNAME record +```bash +Type Name Content Proxy status TTL +CNAME *.. . DNS only/Proxied Auto +``` +or +```bash +Type Name Content Proxy status TTL +CNAME *.. DNS only/Proxied Auto +``` + +For certificate validation: +```bash +Type Name Content Proxy status TTL +CNAME _acme-challenge.. ..zerops.zone DNS only Auto +``` + +### Combining Main Domain and Wildcard Domain + +To use both `` and `*.`, specify both variants in your [Zerops configuration](/features/access#configuring-http-routing). Zerops automatically issues a single shared certificate for both the main domain and all its subdomains. + +## Cloudflare-Specific Configuration + +#### SSL/TLS Mode +Set encryption mode to `Full (strict)` or `Full` + - Ensures end-to-end encryption + - *Full* mode requires any SSL certificate (even if self-signed/expired), while *Full (strict)* requires a valid certificate + +#### Certificate Management +1. Enable Edge Certificates to allow Cloudflare to manage SSL/TLS certificates +2. During initial setup, handle HTTPS settings in one of two ways: + - **Option A (Simple but Limited)**: + - Disable `Always Use HTTPS` + - **Option B (Recommended for Production)**: + - Keep `Always Use HTTPS` enabled + - Create and enable a Configuration Rule, which disables Automatic HTTPS Rewrites for this specific path: + ``` + Field: URI Path + Operator: starts with + Value: /.well-known/acme-challenge/ + ``` + This rule disables Automatic HTTPS Rewrites for the certificate validation path. + +## Validation Steps + +Test your configuration: +```bash +# Check DNS resolution +dig AAAA + +# Verify connectivity +curl -vI https:// + +# Test IPv4 access +curl -4 -v https:// + +# Test IPv6 access +curl -6 -v https:// +``` + +## Troubleshooting Guide + +1. **DNS Resolution Issues** + - Confirm correct record configuration + - Verify proxy status settings + - Check IPv6 address accuracy + - Allow time for DNS propagation (typically 5-10 minutes) + +2. **Connection Problems** + - Test both IPv4 and IPv6 connectivity + - Check proxy server status if applicable + - Confirm port configurations + +3. **Certificate Issues** + - Verify proper _acme-challenge CNAME configuration for wildcard domains + - Check that DNS records match the domains configured in Zerops + - **Cloudflare-specific certificate problems**: + - Verify `Always Use HTTPS` is disabled + - If you encounter **too many redirects** or similar SSL errors: + - Double-check that SSL/TLS encryption mode is set to *Full* or *Full (strict)*, not *Flexible* + - SSL mode might show incorrectly for newly added domains, try refreshing the page if settings appear incorrect + +## Technical Background + +### Understanding Shared IPv4 Addresses {#understand-shared-ipv4} + +Shared IPv4 allows multiple Zerops projects to use the same IPv4 address while maintaining separate routing for each project. Here's how it works: + +1. When a visitor makes a request, it first arrives at the shared IPv4 address +2. The system looks at the domain name in the request (using SNI - Server Name Indication) +3. For security, it checks if this domain properly resolves to your project's IPv6 address +4. Only if IPv6 address matches your project will the traffic be routed correctly + +This is why configuring both A (IPv4) and AAAA (IPv6) records is crucial when using shared IPv4 addresses - the IPv6 record acts as a security key that helps prevent unauthorized use of the shared IPv4 address. + +### Certificate Verification Methods + +When issuing SSL/TLS certificates, different verification methods are used depending on the certificate type: + +#### HTTP-01 vs DNS-01 Verification + +- **Regular certificates** (for a single domain like ``) are typically issued using the **HTTP-01** challenge method. This verification checks that you control the domain by placing a specific file at a specific URL. + +- **Wildcard certificates** (for domains like `*.`) must be issued using the **DNS-01** challenge method. This method requires creating specific TXT records in your DNS configuration. + +### How Zerops Handles Wildcard Certificate Verification + +Zerops simplifies the DNS-01 challenge process: + +1. You create a CNAME record (e.g., `_acme-challenge. CNAME .zerops.zone`) +2. When a certificate needs to be issued or renewed, Zerops automatically creates the required TXT records on its `zerops.zone` domain +3. The certificate authority verifies these TXT records through the CNAME redirection +4. Once verified, the wildcard certificate is issued without requiring manual intervention \ No newline at end of file diff --git a/apps/docs/content/features/env-variables.mdx b/apps/docs/content/features/env-variables.mdx index baf82b616..fe48aea24 100644 --- a/apps/docs/content/features/env-variables.mdx +++ b/apps/docs/content/features/env-variables.mdx @@ -17,9 +17,9 @@ You can define service-level variables in two ways: #### 1. Build & Runtime Variables -These variables are defined with `envVariables` attribute in the `build` or `run` section of your [zerops.yml](/zerops-yml/specification) file and are accessible within their respective containers. +These variables are defined with `envVariables` attribute in the `build` or `run` section of your [zerops.yaml](/zerops-yaml/specification) file and are accessible within their respective containers. -```yml title="zerops.yml" +```yaml title="zerops.yaml" ... build: envVariables: @@ -36,10 +36,10 @@ These variables are defined with `envVariables` attribute in the `build` or `run DB_PASS: password ``` -See how to [reference variables](#referencing-variables) between services and deployment phases. +See how to [reference variables](#referencing-variables) between services and between build and runtime environments. :::note -Your application must be redeployed when updating environmental variables in `zerops.yml`. +Your application must be redeployed when updating environmental variables in `zerops.yaml`. ::: #### 2. Secret Variables @@ -65,9 +65,9 @@ Navigate to service details and find **Environment variables** in the menu. You ##### Import Configuration -Create secret variables for a service with `envSecrets` attribute. See the complete [import.yml structure](/reference/import). +Create secret variables for a service with `envSecrets` attribute. See the complete [import.yaml structure](/reference/import). -```yml title="import.yml" +```yaml title="import.yaml" services: ... envSecrets: @@ -85,7 +85,7 @@ These variables can also be [referenced](#referencing-variables). ## Project Variables -Variables that apply across all services within a [project](/features/infrastructure#project). These provide a way to share common configuration across services. +Variables that apply across all services within a [project](/features/infrastructure#projects). These provide a way to share common configuration across services. They work similarly to service secret variables but at project scope - they're managed through the GUI and can be updated without redeployment (though services need to be restarted). @@ -102,9 +102,9 @@ Access **Project environment variables** in your project detail to: #### Import Configuration -Create project variables with `envVariables` attribute. See the complete [import.yml structure](/reference/import). +Create project variables with `envVariables` attribute. See the complete [import.yaml structure](/reference/import). -```yml title="import.yml" +```yaml title="import.yaml" project: ... envVariables: @@ -145,7 +145,7 @@ When the same environment variable key exists in multiple places, Zerops follows You can reference other variables using the `${variable_name}` syntax: #### Within Same Service -```yml +```yaml envVariables: id: 42069 hostname: app @@ -154,7 +154,7 @@ envVariables: #### Across Services Prefix variables with their respective service name: -```yml +```yaml setup: dbtest run: envVariables: @@ -166,31 +166,39 @@ setup: app dbConnection: ${dbtest_connectionString} ``` -#### Between Build and Runtime -Prefix variables with `RUNTIME_` or `BUILD_`: -```yml +#### Between Build and Runtime Environments + +Build and runtime are two distinct environments in Zerops. Each environment can have its own set of variables, and you can use the same variable names in both environments since they are separate. Due to this separation, variables defined in one are not automatically accessible in the other. + +To share variables between environments, you need to use specific prefixes: +- Use `RUNTIME_` prefix to access runtime variables during build +- Use `BUILD_` prefix to access build variables during runtime + +Here's an example of `zerops.yaml` file showing how to reference a runtime variable during build: + +```yaml title="zerops.yaml" build: envVariables: - variable: ${RUNTIME_someVariable} + API_KEY: ${RUNTIME_API_KEY} # Using runtime variable during build run: envVariables: - someVariable: hello world + API_KEY: "12345-abcde" # Referenced in build with RUNTIME_ prefix ``` #### Project Variables No prefix needed when referencing project variables: -```yml title="import.yml" +```yaml title="import.yaml" project: ... envVariables: projectName: devel ``` -```yml title="zerops.yml" +```yaml title="zerops.yaml" envVariables: id: 42069 hostname: app name: ${projectName}-${hostname} # Results in: devel-app ``` -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/features/infrastructure.mdx b/apps/docs/content/features/infrastructure.mdx index 66f1775a1..ee61871dc 100644 --- a/apps/docs/content/features/infrastructure.mdx +++ b/apps/docs/content/features/infrastructure.mdx @@ -3,67 +3,141 @@ title: Project & Services Structure description: Explore Project & Services Structure on Zerops. --- import Image from '/src/components/Image'; +import { CheckCircleSolid } from "@medusajs/icons"; +import { Dropdown, DropdownItem } from '/src/components/Dropdown'; -Zerops structure has three levels - **projects**, **services** and **containers**. +Zerops organizes your infrastructure into three hierarchical levels: **projects**, **services**, and **containers**. -## Project +## Projects -The **project** is the top-level entity, encompassing various **services**. It requires a functioning **core**, which includes: +A project is the top-level entity in Zerops, functioning as a private network where services can communicate internally and share environment variables. Each project provides essential infrastructure including load balancing, routing, and container orchestration. +:::tip +Consider your project organization strategy carefully. You can create separate projects for different environments or consolidate multiple applications in a single project to optimize resource usage. +::: + +### Key Project Features + +Projects provide several important capabilities: +- **Private Networking**: All services within a project share a secure network +- **Environment Variables**: Services can access shared environment variables +- **IPv6/IPv4 Addressing**: Each project receives an IPv6 address, with optional IPv4 addressing + +### Project Core + +When you create a project, it requires a functioning **core** that includes: - Logger and statistics services -- HTTP routing (with SSL certificates) -- IP routing (with built-in firewall) +- HTTP routing with automatic SSL certificate management +- IP routing with integrated firewall -The core activates when the first user service is deployed and incurs a fixed monthly fee. +Zerops offers two core types to match different needs and budgets: ### Lightweight Core +Our single-container solution that packs everything you need to get started quickly. Includes a project controller, L3 balancer, firewall, logger, statistics, and HTTP handling—all in one efficient package. Perfect for development projects and smaller production workloads where simplicity matters. Automatically handles SSL certificates and load balancing without complex setup. +
Lightweight Core -Single-container infrastructure with L3 balancer, firewall, logger, and statistics service. Includes HTTP routing with SSL termination, automatic certificate generation, and load balancers. Comes with 15 hours of build time, 5 GB backup space, and 100 GB egress traffic. Ideal for development and smaller production workloads. - ### Serious Core +Enterprise-grade infrastructure designed for mission-critical applications. Separates core services across multiple containers for true redundancy and high availability. Includes redundant project controllers and balancers, dedicated statistics and logging services, and advanced HTTP management. Ideal when your production workloads demand maximum reliability and scalability without compromise. +
Serious Core -Highly available infrastructure with redundant core services, advanced load balancing, and SSL management. Features 150 hours of build time, 25 GB backup space, and 3 TB egress traffic. Built for production workloads requiring high reliability and scalability. - -For detailed information about both core types and their resource limits, visit our [pricing page](/features/pricing#project-plans). - -### Key Features - -- **Private Network**: All services in a project share a dedicated network and have access to each other's environment variables. -- **IPv6/IPv4**: Each project automatically gets an IPv6 address. An IPv4 address can be added at an extra cost. - -:::tip -Create separate projects for different environments (e.g., development, staging, production) or use one project shared among developers to save costs. -::: - -## Services & Containers - -### Services - -Services are responsible for encapsulating your containers. -A project can host unlimited **services**, which can be: - -- **Fully managed**: Includes automatic scaling, routing, and repairs. -- **Partially managed**: Some management aspects are handled manually. - -### Containers - -Each service consists of one or more **containers**. Containers may vary by function or type, such as in **HA (High Availability) mode**, where a fully managed MariaDB service might have 5 containers (3 for databases, 2 for proxies). - -- **Predefined Images**: Containers use Zerops' predefined images, ranging from **fully managed** (e.g., databases) to **customizable** (e.g., Ubuntu). -- **Public Accessibility**: Services can be exposed via Zerops subdomains, custom domains, or public ports on IPv6/IPv4 addresses. - -**Refer to the technology section for detailed setup instructions.** +### Features Comparison + +Compare our core infrastructure options side-by-side to find the right fit for your project needs, from resource allocations to available features: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Lightweight CoreSerious Core
InfrastructureSingle container (limited redundancy)Multi-container (highly available)
SSL Termination
Automatic Certificate Generation
Proxy / Load Balancer
IPv6 Address
Build Time15 hours150 hours
Backup Space5 GB25 GB
Egress100 GB3 TB
Failover ProtectionLimitedComprehensive
+ +For detailed pricing information on both core types, visit our [pricing page](/features/pricing#project-core-plans). + +## Services + +Services encapsulate your containers and provide specific functionality. A project can contain unlimited services, each with its own purpose. + +Services in Zerops can be: +- **Fully managed**: Zerops handles scaling, routing, and repairs automatically +- **Partially managed**: You maintain control over certain management aspects + +## Containers + +Containers are the most granular level of the Zerops architecture. Each service consists of one or more containers that work together to deliver functionality. + +In High Availability (HA) mode, a service may utilize multiple containers with different roles. For example, a fully managed MariaDB service might use 5 containers: 3 for the database and 2 for proxies. + +Containers in Zerops: +- Use predefined images ranging from fully managed databases to customizable Ubuntu environments +- Can be exposed to the public via Zerops subdomains, custom domains, or public ports (for applicable service types only) +- Operate within the service's resource constraints \ No newline at end of file diff --git a/apps/docs/content/features/pipeline.mdx b/apps/docs/content/features/pipeline.mdx index 110998e06..9eda02003 100644 --- a/apps/docs/content/features/pipeline.mdx +++ b/apps/docs/content/features/pipeline.mdx @@ -48,11 +48,11 @@ export const customizeRuntime = [ ## Configure the pipeline Zerops provides a customizable build and runtime environment for your application. -Start by adding a [zerops.yml](/zerops-yml/specification) file to the **root of your repository** and modify it to fit your application. +Start by adding a [zerops.yaml](/zerops-yaml/specification) file to the **root of your repository** and modify it to fit your application. Here is a basic example for a Node.js application: -```yml +```yaml zerops: - setup: api build: @@ -67,7 +67,7 @@ zerops: start: npm start ``` -The zerops.yml in your repository tells Zerops how to build and deploy your application. +The zerops.yaml in your repository tells Zerops how to build and deploy your application. Zerops will follow these instruction when the build & deploy pipeline is triggered for the Node.js service named `api`: @@ -78,9 +78,9 @@ Zerops will follow these instruction when the build & deploy pipeline is trigger 5. Cache the content of the `./node_modules` folder for the next build 6. Start your application using the `npm start` command -Learn more about all `zerops.yml` parameters for your runtime: +Learn more about all `zerops.yaml` parameters for your runtime: - + ## Trigger the pipeline @@ -111,9 +111,9 @@ Trigger the build & deploy pipeline automatically with each push to the selected To start a new build & deploy pipeline manually, use the [Zerops CLI](/references/cli). zCLI is the Zerops command-line tool. -The [zcli push](/references/cli/commands#push) command uploads your application code, builds and deploys your application in Zerops. +The [zcli service push](/references/cli/commands#service-push) command uploads your application code, builds and deploys your application in Zerops. -The command triggers the build pipeline defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the `--workingDir` flag. +The command triggers the build pipeline defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the `--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -134,8 +134,8 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` If you just want to [deploy](#deploy-phase) your already built application to Zerops, use the zcli service deploy command instead. @@ -181,8 +181,8 @@ The time limit for the whole build pipeline is **1 hour**. After 1 hour, Zerops ### Customize the build environment -Each runtime service in Zerops has a default build environment with a major version based on the [build.base](/zerops-yml/specification#base-) attribute in `zerops.yml`. -To install additional packages or tools add one or more [build.prepareCommands](/zerops-yml/specification#preparecommands-) commands to your `zerops.yml`. +Each runtime service in Zerops has a default build environment with a major version based on the [build.base](/zerops-yaml/specification#base-) attribute in `zerops.yaml`. +To install additional packages or tools add one or more [build.prepareCommands](/zerops-yaml/specification#preparecommands-) commands to your `zerops.yaml`. Learn more about what is included in the default build environment: @@ -227,7 +227,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/go/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/go/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -245,7 +245,7 @@ The old containers are then removed from the project balancer so they don't rece ### Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/nodejs/how-to/build-pipeline#start), configure a [readiness check](/nodejs/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/nodejs/how-to/build-pipeline#start), configure a [readiness check](/nodejs/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -266,12 +266,12 @@ Read the [runtime log](/nodejs/how-to/logs#runtime-log) to troubleshoot failed r ## Customize the runtime environment -Each runtime service in Zerops has a default runtime environment with a major version based on the [run.base](/zerops-yml/specification#base--1) attribute in `zerops.yml`. -To install additional packages or tools add one or more [run.prepareCommands](/zerops-yml/specification#preparecommands--1) commands to your `zerops.yml`. +Each runtime service in Zerops has a default runtime environment with a major version based on the [run.base](/zerops-yaml/specification#base--1) attribute in `zerops.yaml`. +To install additional packages or tools add one or more [run.prepareCommands](/zerops-yaml/specification#preparecommands--1) commands to your `zerops.yaml`. Learn more about what is included in the default runtime environment: - +

-When the first deploy with a defined [prepareCommands](/zerops-yml/specification#preparecommands--1) attribute is triggered, Zerops will +When the first deploy with a defined [prepareCommands](/zerops-yaml/specification#preparecommands--1) attribute is triggered, Zerops will 1. create a prepare runtime container 2. optionally: [copy selected folders or files from your build container] -3. run the [run.prepareCommands](/zerops-yml/specification#preparecommands--1) commands in the defined order +3. run the [run.prepareCommands](/zerops-yaml/specification#preparecommands--1) commands in the defined order Some packages or tools can take a long time to install. Therefore, Zerops caches your custom runtime environment after the installation of your custom packages or tools is completed. When the second or following deploy is triggered, Zerops will use the custom runtime cache from the previous deploy if following conditions are met: -1. Content of the [build.addToRunPrepare](/zerops-yml/specification#addtorunprepare-) and [run.prepareCommands](/zerops-yml/specification#preparecommands--1) attributes didn't change from the previous deploy +1. Content of the [build.addToRunPrepare](/zerops-yaml/specification#addtorunprepare-) and [run.prepareCommands](/zerops-yaml/specification#preparecommands--1) attributes didn't change from the previous deploy 2. The custom runtime cache wasn't invalidated in the Zerops GUI. When the custom runtime cache is used, Zerops doesn't create a prepare runtime container and executes the deployment of your application directly. @@ -317,8 +317,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -326,16 +326,16 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: ## Manage build and deploys @@ -374,7 +374,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/features/pricing.mdx b/apps/docs/content/features/pricing.mdx deleted file mode 100644 index 29118f712..000000000 --- a/apps/docs/content/features/pricing.mdx +++ /dev/null @@ -1,197 +0,0 @@ ---- -title: Pricing Plans & Usage -description: Detailed pricing description for deployment on zerops. ---- - -import PricingCalculator from "@site/src/components/PricingCalculator" -import { CheckCircleSolid } from "@medusajs/icons"; - -:::tip Calculate Your Costs -Use our basic [pricing calculator](#pricing-calculator) below to estimate your monthly costs based on your specific needs. -::: - -## Understanding Projects - -A Zerops project represents a private network where services can communicate internally and share environment variables. You have the flexibility to: -- Host multiple small websites within a single project -- Create separate projects for different environments (production, development, local) of a larger application - -The total cost of deploying an application includes your project's **core package cost** + the **cost of the resources** of the services inside a project **(+ extra costs like Unique IPv4, Extra Egress, Object Storage, Backup Space, Build Time, etc)**. - -## Project Plans - -Every deployment on Zerops requires a project, which provides essential infrastructure and functionality. Projects are the foundation of your application, handling core services like load balancing, routing, and container orchestration. - -### Lightweight Plan -- **Cost:** Free -- **Best for:** Development, testing, and small-scale applications -- **Infrastructure:** Single container setup -- **Features Include:** - - Core services (L3 balancer with firewall, logger, statistics service) - - HTTP routing & load balancers with SSL termination and automatic certificate generation - - Proxy / load balancers for managed services - - Unique IPv6 IP address - - 15 hours of build time on performant build containers - - 5 GB space for automatic, encrypted backups - - 100 GB of egress -- **Limitations:** Shared IPv4 address, no high availability - -### Serious Plan -- **Cost:** $10 / 30 days -- **Best for:** Production and high-availability applications -- **Infrastructure:** Multi-container, highly available setup -- **Features Include:** - - Highly available core services (L3 balancer with firewall, logger, statistics service) - - Highly available HTTP routing & load balancer with SSL termination - - Proxy / load balancers for managed services - - Unique IPv6 IP address - - 150 hours of build time on performant build containers - - 25 GB space for automatic, encrypted backups - - 3 TB of egress -- **Benefits:** Ready for production workloads with automatic failover - -:::info Billing -Project costs are calculated based on actual usage. You're only charged for the time your project is active, calculated down to the minute. -::: - -### Plan Comparison - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeaturesLightweight (Free)Serious ($10/30d)
Core ServicesSingle containerHighly available
HTTP Routing & Load BalancerSingle containerHighly available
Proxy / Load Balancer
IPv6 Address
Build Time15 hours150 hours
Backup Space5 GB25 GB
Egress100 GB3 TB
- -### Additional Costs - -The following costs apply when you exceed the plan limits of a project: - - - - - - - - - - - - - - - - - - - - - - -
ResourceCost
Backup Space$0.50 per 5 GB
Build Time$0.50 per 15 hours
Egress Traffic$0.10 per 1 GB
- - -## Service Resources - -Resources are allocated per service and billed by the minute, though credit is deducted hourly based on actual usage. - -### Resource Pricing - - - - - - - - - - - - - - - - - - - - - - - - - - -
ResourceCost
Shared CPU$0.60 per CPU / 30 days
Dedicated CPU$6.00 per CPU / 30 days
RAM$0.75 per 0.25 GB / 30 days
Disk space$0.05 per 0.5 GB / 30 days
- -### Additional Feature Costs - -The following costs may apply if you opt for additional features: - - - - - - - - - - - - - - - - - - -
FeatureCost
Unique IPv4 address$3.00 / 30 days
Object Storage$0.01 / GB per 30 days
- -:::info Object Storage -External storage solution ideal for storing files, backups, and static assets outside your main storage. Perfect for scalable content delivery and backup strategies. -::: - -## Pricing Calculator - - - diff --git a/apps/docs/content/features/scaling-ha.mdx b/apps/docs/content/features/scaling-ha.mdx index 80fa49021..56e06708a 100644 --- a/apps/docs/content/features/scaling-ha.mdx +++ b/apps/docs/content/features/scaling-ha.mdx @@ -122,7 +122,7 @@ Your data is stored only in a single container. If the container or the underlyi If the **Highly Available** mode is chosen, Zerops will deploy the database cluster with a fixed number of containers and control mechanisms for automatic cluster repair. -The KeyDB (Redis) cluster consists of 2 containers in the master-master replica. MariaDB, PostgreSQL databases and RabbitMQ message broker are deployed in 3 containers connected in the High Availability cluster with 2 additional load balancers which ensures high reliability. +The KeyDB (Redis) cluster consists of 2 containers in the master-master replica. MariaDB and PostgreSQL databases are deployed in 3 containers connected in the High Availability cluster with 2 additional load balancers which ensures high reliability. You are not charged for the resources consumed by load balancers. diff --git a/apps/docs/content/frameworks/laravel.mdx b/apps/docs/content/frameworks/laravel.mdx index f07f123d9..01908c973 100644 --- a/apps/docs/content/frameworks/laravel.mdx +++ b/apps/docs/content/frameworks/laravel.mdx @@ -14,7 +14,7 @@ import IconTwill from '@theme/Icon/Twill'; Zerops implements what we call "transparent infrastructure" - you get enterprise-grade capabilities with development-friendly ergonomics. This means: - **Full system access** across all environments -- **Granular resource control** starting at 0.25GB RAM +- **Granular resource control** starting at 0.125GB RAM - **True environment parity** from local to production - **Zero-downtime deployments** by default @@ -112,7 +112,7 @@ services: ### Zero-Downtime Deployments Deploy with confidence using our battle-tested pipeline: -```yaml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -167,7 +167,7 @@ zcli vpn up ``` and select your project. Get your database credentials from the service's **Access details** in your project dashboard and update your local `.env`. See PostgreSQL example below: -```yml +```yaml DB_CONNECTION=pgsql DB_HOST=db.zerops # References the service's hostname DB_PORT=5432 @@ -212,4 +212,4 @@ Choose the workflow that fits your team: - [Laravel Recipe Repository](https://github.com/zeropsio/recipe-laravel-minimal) - [zCLI Documentation](/references/cli) -*Need help? Join our [Discord community](https://discord.gg/zerops) or check out our [quickstart guide](/frameworks/laravel/introduction).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio) or check out our [quickstart guide](/frameworks/laravel/introduction).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/cron.mdx b/apps/docs/content/frameworks/laravel/cron.mdx index 55e408cf1..357018396 100644 --- a/apps/docs/content/frameworks/laravel/cron.mdx +++ b/apps/docs/content/frameworks/laravel/cron.mdx @@ -3,11 +3,11 @@ title: Scheduled Tasks and CRON Jobs description: Learn how to configure and manage scheduled tasks in your Zerops Laravel applications using CRON --- -Zerops provides a convenient way for managing scheduled tasks through CRON jobs, configured directly in your `zerops.yml` file. These tasks can be scheduled to run on single or multiple containers with granular timing control. +Zerops provides a convenient way for managing scheduled tasks through CRON jobs, configured directly in your `zerops.yaml` file. These tasks can be scheduled to run on single or multiple containers with granular timing control. ## Basic Configuration -Cron jobs are defined in the `run.crontab` section of your `zerops.yml`. Each job requires two essential parameters: +Cron jobs are defined in the `run.crontab` section of your `zerops.yaml`. Each job requires two essential parameters: - **command**: The command to execute - **timing**: The CRON schedule expression @@ -21,7 +21,7 @@ run: This example logs the current timestamp every hour. :::tip Detailed Configuration -For comprehensive configuration options and examples, refer to our [CRON configuration guide](/zerops-yml/cron). +For comprehensive configuration options and examples, refer to our [CRON configuration guide](/zerops-yaml/cron). ::: ## Common Implementation Patterns diff --git a/apps/docs/content/frameworks/laravel/env-variables.mdx b/apps/docs/content/frameworks/laravel/env-variables.mdx index 0cc0ccb3b..569bda03a 100644 --- a/apps/docs/content/frameworks/laravel/env-variables.mdx +++ b/apps/docs/content/frameworks/laravel/env-variables.mdx @@ -18,7 +18,7 @@ Some Laravel variables contain sensitive information that should never be expose * Defining them in a configuration file when importing a project or service (allows [automatic generation](#automatic-generation-during-import)) When importing a project or service, you can define secret variables directly in your import configuration: -```yml +```yaml services: - hostname: app type: php-nginx@8.4 @@ -31,8 +31,8 @@ Secret variables can be updated at any time without requiring application redepl ::: #### Automatic Generation During Import -If you prefer to have certain secrets **generated automatically**, you can use the [yaml preprocessor](/references/importyml/pre-processor). This is optional and only available during import: -```yml +If you prefer to have certain secrets **generated automatically**, you can use the [yaml preprocessor](/references/import-yaml/pre-processor). This is optional and only available during import: +```yaml #yamlPreprocessor=on services: - hostname: app @@ -42,16 +42,16 @@ services: ``` ### Runtime Variables -These variables, defined in `zerops.yml`, are typically environment-specific but not sensitive. +These variables, defined in `zerops.yaml`, are typically environment-specific but not sensitive. :::note Changes to runtime variables require application redeployment to take effect. ::: -Below is a complete working example of `envVariables` in `zerops.yml` (sourced from [Laravel Jetstream recipe](https://github.com/zeropsio/recipe-laravel-jetstream/blob/main/zerops.yml)): +Below is a complete working example of `envVariables` in `zerops.yaml` (sourced from [Laravel Jetstream recipe](https://github.com/zeropsio/recipe-laravel-jetstream/blob/main/zerops.yaml)): -```yml title="zerops.yml" +```yaml title="zerops.yaml" run: envVariables: APP_LOCALE: en @@ -118,7 +118,7 @@ Let's look at variable configurations that may need additional context and where #### Application Configuration Core application settings that define your Laravel app's identity, URL structure, and environment parameters. Reference environment variables from the same service. -```yml +```yaml APP_URL: ${zeropsSubdomain} # zeropsSubdomain variable is system generated ASSET_URL: ${APP_URL} VITE_APP_NAME: ${APP_NAME} # APP_NAME variable was created during import (envSecrets) @@ -129,7 +129,7 @@ Essential database connection parameters that securely reference your PostgreSQL It is safe to store `DB_PASSWORD` in `envVariables` by reference as it does not contain the sensitive value itself. -```yml +```yaml DB_HOST: db DB_PASSWORD: ${db_password} DB_USERNAME: ${db_user} @@ -138,7 +138,7 @@ Read more about [database management](/frameworks/laravel/migrations) for Larave #### Storage Configuration S3-compatible object storage settings that enable efficient file handling and asset management in your Laravel application. Reference variables of Object storage service called `storage`. -```yml +```yaml AWS_ACCESS_KEY_ID: ${storage_accessKeyId} AWS_REGION: us-east-1 AWS_BUCKET: ${storage_bucketName} @@ -172,9 +172,9 @@ REDIS_HOST: valkey Learn how to properly [configure cache, queue & session management](/frameworks/laravel/redis) for Laravel in Zerops. :::tip -For automatic execution with each deploy, add these commands to the `initCommands` section of your `zerops.yml` file. +For automatic execution with each deploy, add these commands to the `initCommands` section of your `zerops.yaml` file. -```yml title="zerops.yml" +```yaml title="zerops.yaml" initCommands: - php artisan view:cache - php artisan config:cache diff --git a/apps/docs/content/frameworks/laravel/faq.mdx b/apps/docs/content/frameworks/laravel/faq.mdx index b0839c08e..3990c6b46 100644 --- a/apps/docs/content/frameworks/laravel/faq.mdx +++ b/apps/docs/content/frameworks/laravel/faq.mdx @@ -7,7 +7,7 @@ import { FAQ, FAQItem } from '/src/components/Faq'; - You can set environment variables through the Zerops dashboard or in your `zerops.yml` file under the `run.envVariables` section: + You can set environment variables through the Zerops dashboard or in your `zerops.yaml` file under the `run.envVariables` section: ```yaml zerops: @@ -21,7 +21,7 @@ import { FAQ, FAQItem } from '/src/components/Faq'; - You can run migrations during initialization by adding the command to your `zerops.yml`: + You can run migrations during initialization by adding the command to your `zerops.yaml`: ```yaml zerops: @@ -69,7 +69,7 @@ import { FAQ, FAQItem } from '/src/components/Faq'; - Yes, you can configure cron jobs in your `zerops.yml`: + Yes, you can configure cron jobs in your `zerops.yaml`: ```yaml zerops: diff --git a/apps/docs/content/frameworks/laravel/introduction.mdx b/apps/docs/content/frameworks/laravel/introduction.mdx index 703b07f9e..294476a4d 100644 --- a/apps/docs/content/frameworks/laravel/introduction.mdx +++ b/apps/docs/content/frameworks/laravel/introduction.mdx @@ -72,9 +72,9 @@ Learn more about infrastructure features in documentation section [Project & Ser The project configuration defines your infrastructure using YAML. This approach provides clear, reproducible configuration that can be version controlled. Later in this tutorial, we'll also show how to achieve the same using the GUI. -Create a new file in your project root called `zerops-project-import.yml` with the following content: +Create a new file in your project root called `zerops-project-import.yaml` with the following content: -```yaml title="zerops-project-import.yml" +```yaml title="zerops-project-import.yaml" #yamlPreprocessor=on project: name: laravel-zerops @@ -94,7 +94,7 @@ services: ``` :::tip Generate secrets -The `#yamlPreprocessor=on` directive enables Zerops' [YAML preprocessing](/references/importyml/pre-processor) for this import file, allowing us to use dynamic values and built-in functions like `generateRandomString`. +The `#yamlPreprocessor=on` directive enables Zerops' [YAML preprocessing](/references/import-yaml/pre-processor) for this import file, allowing us to use dynamic values and built-in functions like `generateRandomString`. ::: #### Automatic Resource Management @@ -112,7 +112,7 @@ Through Zerops VPN, you can securely access this database setup directly from yo #### Import the Project Now create the project by running: ```bash -zcli project project-import zerops-project-import.yml +zcli project project-import zerops-project-import.yaml ``` ### Alternative: Creating Project via GUI @@ -137,9 +137,9 @@ Then add the required services: ## Step 3 — Configuring Your Application -The [deployment configuration](/zerops-yml/specification) controls how your application builds and runs. Create a `zerops.yml` file in your project root: +The [deployment configuration](/zerops-yaml/specification) controls how your application builds and runs. Create a `zerops.yaml` file in your project root: -```yaml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -251,7 +251,7 @@ zcli push You'll see the deployment progress with timing for each step: - Initializing build container -- Running build commands from zerops.yml +- Running build commands from zerops.yaml - Creating app version and upgrading PHP+Apache service The entire process usually takes less than a minute to complete. @@ -342,4 +342,4 @@ Congratulations! 🎉 You've successfully deployed a Laravel application on Zero - [Laravel Recipe Repository](https://github.com/zeropsio/recipe-laravel-minimal) - [zCLI Documentation](/references/cli) -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/local-development.mdx b/apps/docs/content/frameworks/laravel/local-development.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/docs/content/frameworks/laravel/logs.mdx b/apps/docs/content/frameworks/laravel/logs.mdx index e9f8c359f..dd7c3f3b6 100644 --- a/apps/docs/content/frameworks/laravel/logs.mdx +++ b/apps/docs/content/frameworks/laravel/logs.mdx @@ -22,7 +22,7 @@ Laravel logging in Zerops is configured through environment variables, such as: - `LOG_STACK`: When using the stack channel, defines which channels to include - `LOG_LEVEL`: Sets the minimum log level to capture (e.g., 'debug', 'info', 'error') -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app run: @@ -47,7 +47,7 @@ Laravel supports several logging channels out of the box: To use multiple logging channels, [configure](#laravel-configuration) the stack channel: -```yml +```yaml LOG_CHANNEL: stack LOG_STACK: syslog,daily ``` diff --git a/apps/docs/content/frameworks/laravel/migrations.mdx b/apps/docs/content/frameworks/laravel/migrations.mdx index a153f4472..01761bce4 100644 --- a/apps/docs/content/frameworks/laravel/migrations.mdx +++ b/apps/docs/content/frameworks/laravel/migrations.mdx @@ -34,9 +34,9 @@ Before running migrations in production, it's strongly recommended to back up yo ### Automatic Migrations -The most reliable way to manage migrations in your deployment pipeline is through automatic execution. Configure this in your `zerops.yml`: +The most reliable way to manage migrations in your deployment pipeline is through automatic execution. Configure this in your `zerops.yaml`: -```yaml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app run: @@ -228,7 +228,7 @@ public function test_migrations_can_be_run() Common migration issues and their solutions: -1. **Migration Timeout** Configure longer timeout in [zerops.yml](/zerops-yml/specification): +1. **Migration Timeout** Configure longer timeout in [zerops.yaml](/zerops-yaml/specification): ```yaml zerops: - setup: app diff --git a/apps/docs/content/frameworks/laravel/recipes/filament-devel.mdx b/apps/docs/content/frameworks/laravel/recipes/filament-devel.mdx index 067eee32b..dd0f3f5bc 100644 --- a/apps/docs/content/frameworks/laravel/recipes/filament-devel.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/filament-devel.mdx @@ -9,7 +9,7 @@ import IconFilament from '@theme/Icon/Filament'; [Filament](https://filamentphp.com/) is a collection of tools for rapidly building beautiful TALL stack (Tailwind, Alpine, Laravel, Livewire) applications. It provides a powerful admin panel, form builder, table builder, and other components that help you build feature-rich web applications with minimal effort. -This recipe demonstrates how to effectively integrate Laravel Filament applications with Zerops, providing a fully production-capable setup. While this setup is built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/pricing#understanding-projects) core package, optimizing costs without compromising functionality. +This recipe demonstrates how to effectively integrate Laravel Filament applications with Zerops, providing a fully production-capable setup. While this setup is built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/infrastructure#project-core) core package, optimizing costs without compromising functionality.
Set up a Laravel environment with Filament's admin panel and TALL stack in a development-optimized configuration.
@@ -32,7 +32,7 @@ For production environments with high-availability services and enterprise-grade ## Application Configuration -The app has been set up to utilize PostgreSQL service and includes Filament's admin panel and components. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service and includes Filament's admin panel and components. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -60,4 +60,4 @@ If you're looking to integrate an existing Laravel Filament application with Zer ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel Filament tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel Filament project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/filament-local.mdx b/apps/docs/content/frameworks/laravel/recipes/filament-local.mdx index 6beef01fa..ab318c3b1 100644 --- a/apps/docs/content/frameworks/laravel/recipes/filament-local.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/filament-local.mdx @@ -9,7 +9,7 @@ import IconFilament from '@theme/Icon/Filament'; [Filament](https://filamentphp.com/) is a collection of tools for rapidly building beautiful TALL stack (Tailwind, Alpine, Laravel, Livewire) applications. It provides a powerful admin panel, form builder, table builder, and other components that help you build feature-rich web applications with minimal effort. -This recipe provides a comprehensive Filament setup with PostgreSQL database, Redis-compatible store, object storage, and automated deployment pipeline, designed for **local development** This recipe provides a streamlined Laravel setup with PostgreSQL database and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/pricing#understanding-projects) core package. This means: +This recipe provides a comprehensive Filament setup with PostgreSQL database, Redis-compatible store, object storage, and automated deployment pipeline, designed for **local development** This recipe provides a streamlined Laravel setup with PostgreSQL database and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/infrastructure#project-core) core package. This means: - Resources are optimized for development workloads - Services can be started/stopped as needed during active development - Cost-effective configuration suitable for development and testing @@ -93,7 +93,7 @@ The app has been set up to utilize: - Built-in object storage for Laravel and Filament-specific filesystem operations - Mailpit as a mock SMTP server for development purposes -Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -126,4 +126,4 @@ If you're looking to integrate an existing Filament application with Zerops, rev ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/filament-prod.mdx b/apps/docs/content/frameworks/laravel/recipes/filament-prod.mdx index e81795dca..ef69475c8 100644 --- a/apps/docs/content/frameworks/laravel/recipes/filament-prod.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/filament-prod.mdx @@ -9,7 +9,7 @@ import IconFilament from '@theme/Icon/Filament'; [Filament](https://filamentphp.com/) is a collection of tools for rapidly building beautiful TALL stack (Tailwind, Alpine, Laravel, Livewire) applications. It provides a powerful admin panel, form builder, table builder, and other components that help you build feature-rich web applications with minimal effort. -This recipe demonstrates how to effectively integrate Laravel Filament applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/pricing#understanding-projects) core package, ensuring enterprise-grade reliability and robust performance. +This recipe demonstrates how to effectively integrate Laravel Filament applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/infrastructure#project-core) core package, ensuring enterprise-grade reliability and robust performance.
Set up a production-ready Laravel environment with Filament's admin panel and TALL stack, backed by enterprise-grade reliability.
@@ -32,7 +32,7 @@ For development environments with cost-efficient resource allocation, consider d ## Application Configuration -The app has been set up to utilize PostgreSQL service and includes Filament's admin panel and components. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service and includes Filament's admin panel and components. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -60,4 +60,4 @@ If you're looking to integrate an existing Laravel Filament application with Zer ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel Filament tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel Filament project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/jetstream-devel.mdx b/apps/docs/content/frameworks/laravel/recipes/jetstream-devel.mdx index d99fee58b..79d97761b 100644 --- a/apps/docs/content/frameworks/laravel/recipes/jetstream-devel.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/jetstream-devel.mdx @@ -9,7 +9,7 @@ import IconLaravelJetstream from '@theme/Icon/LaravelJetstream'; Laravel Jetstream provides a polished application scaffolding for Laravel, featuring authentication, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management features. It serves as the perfect starting point for your next Laravel application. -This recipe demonstrates how to effectively integrate Laravel Jetstream applications with Zerops, providing a fully production-capable setup. While this setup is built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/pricing#understanding-projects) core package, optimizing costs without compromising functionality. +This recipe demonstrates how to effectively integrate Laravel Jetstream applications with Zerops, providing a fully production-capable setup. While this setup is built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/infrastructure#project-core) core package, optimizing costs without compromising functionality.
Set up a Laravel environment with Jetstream's team features and authentication system in a development-optimized configuration.
@@ -32,7 +32,7 @@ For production environments with high-availability services and enterprise-grade ## Application Configuration -The app has been set up to utilize PostgreSQL service and includes Jetstream's authentication scaffolding. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service and includes Jetstream's authentication scaffolding. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -60,4 +60,4 @@ If you're looking to integrate an existing Laravel Jetstream application with Ze ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel Jetstream tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel Jetstream project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/jetstream-local.mdx b/apps/docs/content/frameworks/laravel/recipes/jetstream-local.mdx index 2fdc88cc1..fd7e24083 100644 --- a/apps/docs/content/frameworks/laravel/recipes/jetstream-local.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/jetstream-local.mdx @@ -9,7 +9,7 @@ import IconLaravelJetstream from '@theme/Icon/LaravelJetstream'; Laravel Jetstream provides a polished application scaffolding for Laravel, featuring authentication, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management features. It serves as the perfect starting point for your next Laravel application. -This recipe provides a comprehensive Laravel Jetstream setup with PostgreSQL database, Redis-compatible store, object storage, and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/pricing#understanding-projects) core package. This means: +This recipe provides a comprehensive Laravel Jetstream setup with PostgreSQL database, Redis-compatible store, object storage, and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/infrastructure#project-core) core package. This means: - Resources are optimized for development workloads - Services can be started/stopped as needed during active development - Cost-effective configuration suitable for development and testing @@ -93,7 +93,7 @@ The app has been set up to utilize: - Built-in S3 object storage for Laravel and Jetstream-specific filesystem operations - Mailpit as a mock SMTP server for development purposes -Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -126,4 +126,4 @@ If you're looking to integrate an existing Laravel Jetstream application with Ze ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/jetstream-prod.mdx b/apps/docs/content/frameworks/laravel/recipes/jetstream-prod.mdx index 67ae29a3a..ba6153113 100644 --- a/apps/docs/content/frameworks/laravel/recipes/jetstream-prod.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/jetstream-prod.mdx @@ -9,7 +9,7 @@ import IconLaravelJetstream from '@theme/Icon/LaravelJetstream'; Laravel Jetstream provides a polished application scaffolding for Laravel, featuring authentication, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management features. It serves as the perfect starting point for your next Laravel application. -This recipe demonstrates how to effectively integrate Laravel Jetstream applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/pricing#understanding-projects) core package, ensuring enterprise-grade reliability and robust performance. +This recipe demonstrates how to effectively integrate Laravel Jetstream applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/infrastructure#project-core) core package, ensuring enterprise-grade reliability and robust performance.
Set up a production-ready Laravel environment with Jetstream's team features and authentication system, backed by high-availability services.
@@ -32,7 +32,7 @@ For development environments with cost-efficient resource allocation, consider d ## Application Configuration -The app has been set up to utilize PostgreSQL service and includes Jetstream's authentication scaffolding. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service and includes Jetstream's authentication scaffolding. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -60,4 +60,4 @@ If you're looking to integrate an existing Laravel Jetstream application with Ze ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel Jetstream tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel Jetstream project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/minimal-devel.mdx b/apps/docs/content/frameworks/laravel/recipes/minimal-devel.mdx index 5002461e9..2c8f58704 100644 --- a/apps/docs/content/frameworks/laravel/recipes/minimal-devel.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/minimal-devel.mdx @@ -7,7 +7,7 @@ import DeployButton from '@site/src/components/DeployButton'; import CustomCard from '@site/src/components/CustomCard'; import IconLaravel from '@theme/Icon/Laravel'; -This recipe demonstrates how to effectively integrate Laravel applications with Zerops, providing a fully production-capable setup. While it's built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/pricing#understanding-projects) core package, optimizing costs without compromising functionality. +This recipe demonstrates how to effectively integrate Laravel applications with Zerops, providing a fully production-capable setup. While it's built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/infrastructure#project-core) core package, optimizing costs without compromising functionality.
Set up a streamlined Laravel environment with development-optimized resources and configurations.
@@ -29,7 +29,7 @@ For production environments with high-availability services and enterprise-grade ## Application Configuration -The app has been set up to utilize PostgreSQL service. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -56,4 +56,4 @@ If you're looking to integrate an existing Laravel application with Zerops, revi ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/minimal-local.mdx b/apps/docs/content/frameworks/laravel/recipes/minimal-local.mdx index 08f85a814..cbf34f677 100644 --- a/apps/docs/content/frameworks/laravel/recipes/minimal-local.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/minimal-local.mdx @@ -7,7 +7,7 @@ import DeployButton from '@site/src/components/DeployButton'; import CustomCard from '@site/src/components/CustomCard'; import IconLaravel from '@theme/Icon/Laravel'; -This recipe provides a streamlined Laravel setup with PostgreSQL database and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/pricing#understanding-projects) core package. This means: +This recipe provides a streamlined Laravel setup with PostgreSQL database and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/infrastructure#project-core) core package. This means: - Resources are optimized for development workloads - Services can be started/stopped as needed during active development - Cost-effective configuration suitable for development and testing @@ -81,7 +81,7 @@ Your local environment is now connected to the Zerops infrastructure, utilizing ## Application Configuration -Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -114,4 +114,4 @@ If you're looking to integrate an existing Laravel application with Zerops, revi ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/minimal-prod.mdx b/apps/docs/content/frameworks/laravel/recipes/minimal-prod.mdx index feb03f134..4c0e2230b 100644 --- a/apps/docs/content/frameworks/laravel/recipes/minimal-prod.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/minimal-prod.mdx @@ -7,7 +7,7 @@ import DeployButton from '@site/src/components/DeployButton'; import CustomCard from '@site/src/components/CustomCard'; import IconLaravel from '@theme/Icon/Laravel'; -This recipe demonstrates how to effectively integrate Laravel applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/pricing#understanding-projects) core package, ensuring enterprise-grade reliability and robust performance. +This recipe demonstrates how to effectively integrate Laravel applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/infrastructure#project-core) core package, ensuring enterprise-grade reliability and robust performance.
Set up a production-ready Laravel environment with high-availability services and enterprise-grade reliability.
@@ -29,7 +29,7 @@ For development environments with cost-efficient resource allocation, consider d ## Application Configuration -The app has been set up to utilize PostgreSQL service. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -56,4 +56,4 @@ If you're looking to integrate an existing Laravel application with Zerops, revi ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/twill-devel.mdx b/apps/docs/content/frameworks/laravel/recipes/twill-devel.mdx index aff12e3e8..a2dbdfe4f 100644 --- a/apps/docs/content/frameworks/laravel/recipes/twill-devel.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/twill-devel.mdx @@ -9,7 +9,7 @@ import IconTwill from '@theme/Icon/Twill'; [Twill](https://twillcms.com/) is a flexible CMS toolkit for Laravel that helps you rapidly create a custom administration interface for your application. It provides a robust set of features including content management, media library, block editor, and a powerful publishing workflow system. -This recipe demonstrates how to effectively integrate Laravel Twill applications with Zerops, providing a fully production-capable setup. While this setup is built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/pricing#understanding-projects) core package, optimizing costs without compromising functionality. +This recipe demonstrates how to effectively integrate Laravel Twill applications with Zerops, providing a fully production-capable setup. While this setup is built for professional deployment, we call it a **development environment** due to its streamlined resource allocation and use of the [Lightweight](/features/infrastructure#project-core) core package, optimizing costs without compromising functionality.
Set up a Laravel environment with Twill's CMS framework in a development-optimized configuration.
@@ -32,7 +32,7 @@ For production environments with high-availability services and enterprise-grade ## Application Configuration -The app has been set up to utilize PostgreSQL service and includes Twill's CMS functionality. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service and includes Twill's CMS functionality. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -61,4 +61,4 @@ If you're looking to integrate an existing Laravel Twill application with Zerops ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel Twill tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel Twill project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/twill-local.mdx b/apps/docs/content/frameworks/laravel/recipes/twill-local.mdx index 9dbd5e74f..29949055a 100644 --- a/apps/docs/content/frameworks/laravel/recipes/twill-local.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/twill-local.mdx @@ -9,7 +9,7 @@ import IconTwill from '@theme/Icon/Twill'; [Twill](https://twillcms.com/) is a flexible CMS toolkit for Laravel that helps you rapidly create a custom administration interface for your application. It provides a robust set of features including content management, media library, block editor, and a powerful publishing workflow system. -This recipe provides a comprehensive Twill CMS setup with PostgreSQL database, Redis-compatible store, object storage, and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/pricing#understanding-projects) core package. This means: +This recipe provides a comprehensive Twill CMS setup with PostgreSQL database, Redis-compatible store, object storage, and automated deployment pipeline, designed for **local development** with cost-efficient resource allocation and the [Lightweight](/features/infrastructure#project-core) core package. This means: - Resources are optimized for development workloads - Services can be started/stopped as needed during active development - Cost-effective configuration suitable for development and testing @@ -93,7 +93,7 @@ The app has been set up to utilize: - Built-in object storage for Laravel and Twill-specific filesystem operations - Mailpit as a mock SMTP server for development purposes -Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -126,4 +126,4 @@ If you're looking to integrate an existing Twill application with Zerops, review ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/recipes/twill-prod.mdx b/apps/docs/content/frameworks/laravel/recipes/twill-prod.mdx index 716d4a0dd..aca86ccac 100644 --- a/apps/docs/content/frameworks/laravel/recipes/twill-prod.mdx +++ b/apps/docs/content/frameworks/laravel/recipes/twill-prod.mdx @@ -9,7 +9,7 @@ import IconTwill from '@theme/Icon/Twill'; [Twill](https://twillcms.com/) is a flexible CMS toolkit for Laravel that helps you rapidly create a custom administration interface for your application. It provides a robust set of features including content management, media library, block editor, and a powerful publishing workflow system. -This recipe demonstrates how to effectively integrate Laravel Twill applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/pricing#understanding-projects) core package, ensuring enterprise-grade reliability and robust performance. +This recipe demonstrates how to effectively integrate Laravel Twill applications with Zerops, providing a fully production-grade setup. It's built as a **production environment** with high-availability configuration and uses the [Serious](/features/infrastructure#project-core) core package, ensuring enterprise-grade reliability and robust performance.
Set up a production-ready Laravel environment with Twill's CMS framework, backed by high-availability services and enterprise-grade reliability.
@@ -32,7 +32,7 @@ For development environments with cost-efficient resource allocation, consider d ## Application Configuration -The app has been set up to utilize PostgreSQL service and includes Twill's CMS functionality. Your application's deployment process is managed through [zerops.yml](/zerops-yml/specification), which handles: +The app has been set up to utilize PostgreSQL service and includes Twill's CMS functionality. Your application's deployment process is managed through [zerops.yaml](/zerops-yaml/specification), which handles: - Database migrations - Cache management @@ -61,4 +61,4 @@ If you're looking to integrate an existing Laravel Twill application with Zerops ## Get to know Zerops core concepts in depth Ready to build from scratch? Our [step-by-step Laravel Twill tutorial](/frameworks/laravel/introduction) takes you through the entire process of integrating Zerops with a new Laravel Twill project. -*Need help? Join our [Discord community](https://discord.gg/zerops).* \ No newline at end of file +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/frameworks/laravel/redis.mdx b/apps/docs/content/frameworks/laravel/redis.mdx index 10cb96e0e..cfe1fc58e 100644 --- a/apps/docs/content/frameworks/laravel/redis.mdx +++ b/apps/docs/content/frameworks/laravel/redis.mdx @@ -13,7 +13,7 @@ Zerops provides [Valkey](https://valkey.io), an open-source Redis alternative th To use Valkey (Redis) features with Laravel, first either import Valkey as a service to your Zerops project -```yml +```yaml services: - hostname: valkey type: valkey@7.2 @@ -42,7 +42,7 @@ For production environments, we recommend using `HA` mode. This configuration: Environment variables control how your Laravel application connects to and uses Redis. Below are the core settings grouped by functionality: -```yml +```yaml zerops: - setup: app build: diff --git a/apps/docs/content/frameworks/laravel/smtp.mdx b/apps/docs/content/frameworks/laravel/smtp.mdx index 7b7205dad..c8d0a0997 100644 --- a/apps/docs/content/frameworks/laravel/smtp.mdx +++ b/apps/docs/content/frameworks/laravel/smtp.mdx @@ -86,7 +86,7 @@ Laravel supports multiple mail transport options: Configure your Laravel service with the required mail variables. The following example shows SMTP configuration, but most settings are common across different mail transports: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app run: @@ -179,7 +179,7 @@ Mail::to($user->email)->queue(new WelcomeEmail($user)); For production environments, it's recommended to use a queue system for sending emails to prevent request timeouts and improve application performance. Zerops provides Valkey, an open-source Redis-compatible service that's perfect for handling email queues. First, add the Valkey service to your project: -```yml +```yaml services: - hostname: redis type: valkey@7.2 @@ -187,7 +187,7 @@ services: ``` Configure your Laravel service to use Redis for queues: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app run: @@ -238,7 +238,7 @@ For local development and testing, Zerops provides a Mailpit service that allows Add this to your project import configuration or import the service separately: -```yml +```yaml services: - hostname: mailpit type: go@1 @@ -250,7 +250,7 @@ See [Mailpit recipe repo](https://github.com/zeropsio/recipe-mailpit) for refere Configure your Laravel service to use Mailpit for development: -```yml +```yaml zerops: - setup: app run: diff --git a/apps/docs/content/gleam/faq.mdx b/apps/docs/content/gleam/faq.mdx deleted file mode 100644 index bd53b8fd3..000000000 --- a/apps/docs/content/gleam/faq.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Frequently Asked Questions -description: Get quick answers to your related questions about Gleam from frequently asked questions by people at Zerops. ---- - -import { FAQ, FAQItem } from '/src/components/Faq'; - - - sample answer - diff --git a/apps/docs/content/gleam/how-to/access.mdx b/apps/docs/content/gleam/how-to/access.mdx index b07656c6d..3a6a451a8 100644 --- a/apps/docs/content/gleam/how-to/access.mdx +++ b/apps/docs/content/gleam/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Gleam service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Gleam service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Gleam service is not publicly accessible. When your application ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/gleam/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/gleam/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/gleam/how-to/build-pipeline.mdx b/apps/docs/content/gleam/how-to/build-pipeline.mdx index 7d3862cb3..273bded55 100644 --- a/apps/docs/content/gleam/how-to/build-pipeline.mdx +++ b/apps/docs/content/gleam/how-to/build-pipeline.mdx @@ -8,11 +8,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your Gleam application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -77,9 +77,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -104,7 +104,7 @@ Following options are available for Gleam builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -121,12 +121,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -140,7 +140,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customise your build environment use the [prepareCommands](/gleam/how-to/build-pipeline#preparecommands) attribute. @@ -185,7 +185,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -226,7 +226,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -254,7 +254,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml buildCommands: - | npm i @@ -265,7 +265,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml buildCommands: - npm i - npm run build @@ -275,7 +275,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/gleam/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the --verbose option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build @@ -287,7 +287,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -298,7 +298,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -306,7 +306,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - dist - package.json @@ -314,13 +314,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -332,19 +332,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -363,7 +363,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -390,7 +390,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -408,7 +408,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -439,7 +439,7 @@ Following options are available for Gleam runtimes: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -462,12 +462,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -487,7 +487,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customise your build environment use the `prepareCommands` attribute. @@ -537,7 +537,7 @@ _OPTIONAL._ Customises the Gleam runtime environment by installing additional de additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -591,14 +591,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -610,13 +610,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -656,7 +656,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -677,7 +677,7 @@ Read more about [environment variables](/gleam/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Gleam application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -713,7 +713,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -746,7 +746,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -775,7 +775,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -814,7 +814,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -847,7 +847,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/gleam/how-to/build-process.mdx b/apps/docs/content/gleam/how-to/build-process.mdx index 83b8cb758..29053a333 100644 --- a/apps/docs/content/gleam/how-to/build-process.mdx +++ b/apps/docs/content/gleam/how-to/build-process.mdx @@ -54,11 +54,11 @@ The build cancellation is available before the build pipeline is finished. When The default Gleam build environment contains: - {data.alpine.default} -- selected version of Gleam defined in `zerops.yml` [build.base](/gleam/how-to/build-pipeline#base) parameter +- selected version of Gleam defined in `zerops.yaml` [build.base](/gleam/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/gleam/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/gleam/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/gleam/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/gleam/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`. :::info The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file). @@ -104,7 +104,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/gleam/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/gleam/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbose` option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build diff --git a/apps/docs/content/gleam/how-to/create.mdx b/apps/docs/content/gleam/how-to/create.mdx index 8cca87d42..00c17eb31 100644 --- a/apps/docs/content/gleam/how-to/create.mdx +++ b/apps/docs/content/gleam/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a powerful Gleam runtime service with extensive build support. The Gleam runtime is highly scalable and customizable to suit your development and production needs. With just a few clicks or commands, you can have a production-ready Gleam environment up and running in no time. @@ -82,11 +83,7 @@ You can choose the CPU mode when starting a new service or change it later. The Vertical auto scaling has the following default configuration: -|   | Minimum resource | Maximum resource | -| ------------- | ---------------- | ---------------- | -| **CPU cores** | 1 | 5 | -| **RAM** | 0.25 GB | 32 GB | -| **Disk** | 1 GB | 100 GB | + Gleam services always start with the minimal resources. @@ -161,7 +158,7 @@ Zerops uses a YAML format to describe the project infrastructure. #### Basic example: -Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yml` file with the following content: +Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yaml` file with the following content: ```yaml # basic project data project: @@ -183,7 +180,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Gleam version 20 service with default [auto scaling](/gleam/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/gleam/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Gleam version 20 service with default [auto scaling](/gleam/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/gleam/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -192,7 +189,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -241,7 +238,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Gleam service and a [PostgreSQL](/postgresql/overview) service. -Gleam service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yml](/gleam/how-to/build-pipeline#ports). Gleam service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Gleam service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yaml](/gleam/how-to/build-pipeline#ports). Gleam service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -250,7 +247,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -260,7 +257,7 @@ The `project:` section is required. Only one project can be defined. | **description** | **Optional.** Description of the new project. | Maximum 255 characters. | | **tags** | **Optional.** One or more string tags. Tags do not have a functional meaning, they only provide better orientation in projects. | -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Gleam and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Gleam and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -290,7 +287,7 @@ At least one service in `services:` section is required. You can create a projec @@ -372,9 +369,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [Gleam service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Gleam service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -387,11 +384,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -407,7 +404,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -437,9 +434,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -453,4 +450,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/gleam/how-to/customize-runtime.mdx b/apps/docs/content/gleam/how-to/customize-runtime.mdx index dc46a23fb..764264737 100644 --- a/apps/docs/content/gleam/how-to/customize-runtime.mdx +++ b/apps/docs/content/gleam/how-to/customize-runtime.mdx @@ -24,7 +24,7 @@ The default Gleam runtime environment contains: , Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/gleam/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/gleam/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more `run.prepareCommands` commands to your `zerops.yaml`. When the first deploy with a defined `prepareCommands` attribute is triggered, Zerops will diff --git a/apps/docs/content/gleam/how-to/deploy-process.mdx b/apps/docs/content/gleam/how-to/deploy-process.mdx index d29e82392..b36b9f3e8 100644 --- a/apps/docs/content/gleam/how-to/deploy-process.mdx +++ b/apps/docs/content/gleam/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/gleam/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/gleam/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/gleam/how-to/build-pipeline#start), configure a [readiness check](/gleam/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/gleam/how-to/build-pipeline#start), configure a [readiness check](/gleam/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/gleam/how-to/env-variables.mdx b/apps/docs/content/gleam/how-to/env-variables.mdx index 7fa9f4548..016cd942e 100644 --- a/apps/docs/content/gleam/how-to/env-variables.mdx +++ b/apps/docs/content/gleam/how-to/env-variables.mdx @@ -13,19 +13,19 @@ There are 3 different sets of env variables in Zerops: | environment | type | defined in | | ----------- | ------ | --------------------------------------------------------------------------------- | -| build | basic | [zerops.yml](/gleam/how-to/build-pipeline#envvariables) | -| runtime | basic | [zerops.yml](/gleam/how-to/build-pipeline#envvariables-1) | +| build | basic | [zerops.yaml](/gleam/how-to/build-pipeline#envvariables) | +| runtime | basic | [zerops.yaml](/gleam/how-to/build-pipeline#envvariables-1) | | runtime | secret | [Zerops GUI](#set-secret-env-variables-in-zerops-gui) | Use the [secret env variables](/gleam/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/gleam/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/gleam/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

Gleam service always starts with the minimal resources. @@ -185,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/gleam/how-to/shared-storage.mdx b/apps/docs/content/gleam/how-to/shared-storage.mdx index 5580a9ef2..217ce64bd 100644 --- a/apps/docs/content/gleam/how-to/shared-storage.mdx +++ b/apps/docs/content/gleam/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Gleam service via the comm Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/gleam/how-to/create#create-a-project-description-file) how to define the Gleam service using the description.yml. +[Read the basics](/gleam/how-to/create#create-a-project-description-file) how to define the Gleam service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Gleam service and a shared storage -Follow the article [How to create a project based on the description.yml](/gleam/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/gleam/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/gleam/how-to/trigger-pipeline.mdx b/apps/docs/content/gleam/how-to/trigger-pipeline.mdx index e59008e26..7688135b5 100644 --- a/apps/docs/content/gleam/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/gleam/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/gleam/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/gleam/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/gleam/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/gleam/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/gleam/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/gleam/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/gleam/how-to/upgrade.mdx b/apps/docs/content/gleam/how-to/upgrade.mdx index 285c54e96..15256e3c7 100644 --- a/apps/docs/content/gleam/how-to/upgrade.mdx +++ b/apps/docs/content/gleam/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Gleam version description: Learn how to upgrade your Gleam service's version --- -You can upgrade or downgrade your Gleam service to a different major Gleam version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/gleam/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Gleam version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Gleam version for your runtime. +You can upgrade or downgrade your Gleam service to a different major Gleam version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/gleam/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Gleam version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Gleam version for your runtime. -If you want to build your application with a different major Gleam version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Gleam version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/gleam/overview.mdx b/apps/docs/content/gleam/overview.mdx index 0fbcc73aa..643d3d5f9 100644 --- a/apps/docs/content/gleam/overview.mdx +++ b/apps/docs/content/gleam/overview.mdx @@ -24,9 +24,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-gleam/blob/main/zerops-project-import.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-gleam/blob/main/zerops-project-import.yaml)): -```yml +```yaml project: name: recipe-gleam tags: @@ -114,12 +114,12 @@ It doesn't matter whether it's your first curious introduction to Zerops, you ha }, { type: 'link', - href: '/gleam/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'Zerops.yml', + href: '/gleam/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'Zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -170,7 +170,7 @@ Have you build something that others might find useful? Don't hesitate to share - sample answer -
diff --git a/apps/docs/content/go/how-to/access.mdx b/apps/docs/content/go/how-to/access.mdx index 63d3d2e7e..c6ed5149c 100644 --- a/apps/docs/content/go/how-to/access.mdx +++ b/apps/docs/content/go/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Go service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Go service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Go service is not publicly accessible. When your application is ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/go/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/go/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/go/how-to/build-pipeline.mdx b/apps/docs/content/go/how-to/build-pipeline.mdx index cb1bb1876..f5589f6f0 100644 --- a/apps/docs/content/go/how-to/build-pipeline.mdx +++ b/apps/docs/content/go/how-to/build-pipeline.mdx @@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your Go application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -73,9 +73,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -100,7 +100,7 @@ Following options are available for Go builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -117,12 +117,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -136,7 +136,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customize your build environment use the [prepareCommands](/go/how-to/build-pipeline#preparecommands) attribute. @@ -181,7 +181,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -222,7 +222,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -249,7 +249,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. Suppose your `main.go` file is in a `src` directory. -```yml +```yaml buildCommands: - | cd src @@ -260,7 +260,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. Suppose your `main.go` file is in a `src` directory. -```yml +```yaml buildCommands: - cd src - go build -o app src/main.go @@ -270,7 +270,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/go/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the --verbose option. -```yml +```yaml buildCommands: - go build -v -o app main.go ``` @@ -281,7 +281,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -290,7 +290,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -298,7 +298,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - app - file.txt @@ -306,13 +306,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -324,19 +324,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -355,7 +355,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -382,7 +382,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -400,7 +400,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -431,7 +431,7 @@ Following options are available for Go builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -454,12 +454,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -479,7 +479,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customise your build environment use the `prepareCommands` attribute. @@ -547,7 +547,7 @@ _OPTIONAL._ Customises the Go runtime environment by installing additional depen major version of Go, Zerops command line tool and `git` and `wget`. To install additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -601,14 +601,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -620,13 +620,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -666,7 +666,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -687,7 +687,7 @@ Read more about [environment variables](/go/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Go application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -723,7 +723,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -772,7 +772,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -801,7 +801,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -840,7 +840,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -888,7 +888,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/go/how-to/build-process.mdx b/apps/docs/content/go/how-to/build-process.mdx index 40f6d9c02..b82c31462 100644 --- a/apps/docs/content/go/how-to/build-process.mdx +++ b/apps/docs/content/go/how-to/build-process.mdx @@ -45,14 +45,14 @@ The build cancellation is available before the build pipeline is finished. When The default Go build environment contains: - {data.alpine.default} -- selected version of Go defined in `zerops.yml` [build.base](/go/how-to/build-pipeline#base) parameter +- selected version of Go defined in `zerops.yaml` [build.base](/go/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `git` and `wget` :::note -To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yml/specification#os-) attribute. +To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yaml/specification#os-) attribute. -Additional packages and tools can be installed using [build.prepareCommands](/zerops-yml/specification#preparecommands-). +Additional packages and tools can be installed using [build.prepareCommands](/zerops-yaml/specification#preparecommands-). ::: :::info @@ -99,7 +99,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/go/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/go/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the verbose `-v` option. -```yml +```yaml build: - go build -v ``` diff --git a/apps/docs/content/go/how-to/create.mdx b/apps/docs/content/go/how-to/create.mdx index e28a19562..85c7381df 100644 --- a/apps/docs/content/go/how-to/create.mdx +++ b/apps/docs/content/go/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a Go runtime service with extensive build support. Go runtime is highly scalable and customisable to suit both development and production. @@ -81,32 +82,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
+ Go service always starts with the minimal resources. @@ -182,7 +158,7 @@ Zerops uses a yaml format to describe the project infrastructure. #### Basic example: -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -205,7 +181,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Go version 1 service with default [auto scaling](/go/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/go/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Go version 1 service with default [auto scaling](/go/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/go/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -214,7 +190,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -263,7 +239,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Go service and a [PostgreSQL](/postgresql/overview) service. -Go service with "app" hostname, the internal port(s) the service listens on will be defined later in the zerops.yml. Go service will run on version 1 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Go service with "app" hostname, the internal port(s) the service listens on will be defined later in the zerops.yaml. Go service will run on version 1 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -272,7 +248,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -304,7 +280,7 @@ The `project:` section is required. Only one project can be defined. Specifies the service type and version.
- See what [Go service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Go service types](/references/import-yaml/type-list#runtime-services) are currently supported. @@ -368,9 +344,9 @@ The `project:` section is required. Only one project can be defined. -### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -383,11 +359,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -403,7 +379,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -433,9 +409,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -449,4 +425,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/go/how-to/customize-runtime.mdx b/apps/docs/content/go/how-to/customize-runtime.mdx index 5301b09a3..4a860baf5 100644 --- a/apps/docs/content/go/how-to/customize-runtime.mdx +++ b/apps/docs/content/go/how-to/customize-runtime.mdx @@ -22,9 +22,9 @@ The default Go runtime environment contains: - Git :::note -To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yml/specification#os--1) attribute. +To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yaml/specification#os--1) attribute. -Additional packages and tools can be installed using [run.prepareCommands](/zerops-yml/specification#preparecommands--1). +Additional packages and tools can be installed using [run.prepareCommands](/zerops-yaml/specification#preparecommands--1). ::: ## Runtime Flow diff --git a/apps/docs/content/go/how-to/deploy-process.mdx b/apps/docs/content/go/how-to/deploy-process.mdx index 7c8fe0986..97ec1c5fa 100644 --- a/apps/docs/content/go/how-to/deploy-process.mdx +++ b/apps/docs/content/go/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/go/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/go/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/go/how-to/build-pipeline#start), configure a [readiness check](/go/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/go/how-to/build-pipeline#start), configure a [readiness check](/go/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/go/how-to/env-variables.mdx b/apps/docs/content/go/how-to/env-variables.mdx index 755883b4f..f1a436334 100644 --- a/apps/docs/content/go/how-to/env-variables.mdx +++ b/apps/docs/content/go/how-to/env-variables.mdx @@ -23,12 +23,12 @@ There are 3 different sets of env variables in Zerops: basic build - zerops.yml + zerops.yaml basic runtime - zerops.yml + zerops.yaml secret @@ -41,13 +41,13 @@ There are 3 different sets of env variables in Zerops: Use the [secret env variables](/go/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/go/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/go/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

- - - Resources Type - Minimum resource - Maximum resource - - - - - CPU cores - 1 - 5 - - - RAM - 0.25 GB - 32 GB - - - Disk - 1 GB - 100 GB - - - - + Go service always starts with the minimal resources. @@ -207,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/go/how-to/shared-storage.mdx b/apps/docs/content/go/how-to/shared-storage.mdx index 13f2372d7..e4f9aa047 100644 --- a/apps/docs/content/go/how-to/shared-storage.mdx +++ b/apps/docs/content/go/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Go service via the command Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/go/how-to/create#create-a-project-description-file) how to define the Go service using the description.yml. +[Read the basics](/go/how-to/create#create-a-project-description-file) how to define the Go service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Go service and a shared storage -Follow the article [How to create a project based on the description.yml](/go/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/go/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/go/how-to/trigger-pipeline.mdx b/apps/docs/content/go/how-to/trigger-pipeline.mdx index 340098812..4e3e261b0 100644 --- a/apps/docs/content/go/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/go/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/go/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/go/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/go/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/go/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/go/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/go/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/go/how-to/upgrade.mdx b/apps/docs/content/go/how-to/upgrade.mdx index b331ef67c..e4f5f3cee 100644 --- a/apps/docs/content/go/how-to/upgrade.mdx +++ b/apps/docs/content/go/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Go version description: Learn how to upgrade your go service's version --- -You can upgrade or downgrade your Go service to a different major Go version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/go/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Go version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Go version for your runtime. +You can upgrade or downgrade your Go service to a different major Go version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/go/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Go version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Go version for your runtime. -If you want to build your application with a different major Go version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Go version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/go/overview.mdx b/apps/docs/content/go/overview.mdx index 57d5f3bec..755beaa8a 100644 --- a/apps/docs/content/go/overview.mdx +++ b/apps/docs/content/go/overview.mdx @@ -23,9 +23,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-go-hello-world/blob/main/import-project/description.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-go-hello-world/blob/main/import-project/description.yaml)): -```yml +```yaml project: name: my-first-project services: @@ -94,12 +94,12 @@ Do you have any questions? Check the step-by-step tutorial, browse the documenta }, { type: 'link', - href: '/go/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'zerops.yml', + href: '/go/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -150,7 +150,7 @@ Have you build something that others might find useful? Don't hesitate to share 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-go-hello-world/blob/main/import-project/description.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-go-hello-world/blob/main/import-project/description.yaml)): -```yml +```yaml project: name: my-first-project services: diff --git a/apps/docs/content/go/tutorial/runtime-sql.mdx b/apps/docs/content/go/tutorial/runtime-sql.mdx index 3fa48552f..80b4e139d 100644 --- a/apps/docs/content/go/tutorial/runtime-sql.mdx +++ b/apps/docs/content/go/tutorial/runtime-sql.mdx @@ -23,13 +23,13 @@ In the detail of each step, you can find a link with more information about the
2. Create a project.

- Learn more about projects in Zerops. See how to import a whole project into Zerops. + Learn more about projects in Zerops. See how to import a whole project into Zerops.

- 3. In the left menu, click on Import services, copy & paste the contents of the `import-services.yml` config file from the recipe repository of your choice. Then click on Import service. + 3. In the left menu, click on Import services, copy & paste the contents of the `import-services.yaml` config file from the recipe repository of your choice. Then click on Import service.

Learn more about services in Zerops and how to import a service to an existing project. diff --git a/apps/docs/content/go/tutorial/step-by-step.mdx b/apps/docs/content/go/tutorial/step-by-step.mdx index 08c9499d3..aea2b3fd1 100644 --- a/apps/docs/content/go/tutorial/step-by-step.mdx +++ b/apps/docs/content/go/tutorial/step-by-step.mdx @@ -23,7 +23,7 @@ In the detail of each step, you can find a link with more information about the

2. Create a project.

- Learn more about projects in + Learn more about projects in Zerops. See how to import a whole project into Zerops.

@@ -31,7 +31,7 @@ In the detail of each step, you can find a link with more information about the
3. In the left menu, click on Import services, copy & paste the - contents of this yaml file and click on Import service. + contents of this yaml file and click on Import service.

Learn more about services in Zerops and how to import a service to an existing project. diff --git a/apps/docs/content/help/faq.mdx b/apps/docs/content/help/faq.mdx index 0d859da8f..0d55f65b9 100644 --- a/apps/docs/content/help/faq.mdx +++ b/apps/docs/content/help/faq.mdx @@ -5,6 +5,7 @@ description: Get quick answers to your related questions about Zerops from frequ import Accordion from '/src/components/Accordion'; import { FAQ, FAQItem } from '/src/components/Faq'; +import Image from '/src/components/Image'; Get quick answers to your related questions about Zerops from frequently asked questions we get asked. @@ -16,7 +17,34 @@ Get quick answers to your related questions about Zerops from frequently asked q It's free to get started, and no credit card is required! However, we - recommend visiting our pricing page to explore the options that best suit your needs. + recommend visiting our pricing page to explore the options that best suit your needs. + + We also have a calculator on our pricing page that can help you estimate the cost of your project. + + + Our infrastructure is hosted in our own high-tier data center in Prague, + Czech Republic, running on bare metal servers managed by vshosting's senior + admin team. The project was originally started in vshosting.eu, one of the largest providers of managed hosting + in Europe. + + We are actively working on expanding to multiple regions to provide better + global coverage - stay tuned for updates on our Discord server and checkout our roadmap! + + + We have a detailed article discussing whether you should go for a Self-hosted PaaS → [The rise of self-hosted PaaS — is $5 VPS all you need?](https://zerops.io/article/the-rise-of-self-hosted-paa-s-is-5-vps-all-you-need). + + + Navigate to the main menu in the Zerop GUI (with your icon) and add a new user with the selected email to your team. +

+ Runtime Secret Variables +

You can reach us on our Discord server for support. For additional contact options, please visit our contacts page. diff --git a/apps/docs/content/homepage.mdx b/apps/docs/content/homepage.mdx index fa26996a7..f2bccbef6 100644 --- a/apps/docs/content/homepage.mdx +++ b/apps/docs/content/homepage.mdx @@ -44,14 +44,14 @@ export const containers = [ export const databases = [ { name: "PostgreSQL", link: "/postgresql/overview", icon: }, { name: "MariaDB", link: "/mariadb/overview", icon: }, - { name: "KeyDB", link: "/keydb/overview", icon: }, + { name: "Valkey", link: "/valkey/overview", icon: }, { name: "Elasticsearch", link: "/elasticsearch/overview", icon: }, { name: "Typesense", link: "/typesense/overview", icon: }, { name: "Meilisearch", link: "/meilisearch/overview", icon: }, - { name: "Qdrant", icon: }, - { name: "Valkey", icon: }, + { name: "Qdrant", link: "/qdrant/overview", icon: }, + { name: "NATS", link: "/nats/overview", icon: }, + { name: "KeyDB", link: "/keydb/overview", icon: }, { name: "Kafka", icon: }, - { name: "NATS", icon: }, ] export const storages = [ @@ -60,11 +60,8 @@ export const storages = [ ]
-# Zerops Documentation -Zerops is a **developer-first Platform-as-a-Service**, running on **bare metal** from a top-tier datacenter, with every part built from scratch. Zerops aims to be the **perfect mix** of **developer experience**, **flexibility**, **scalability** and **affordability**, making it a **great fit** for applications of **any size**, **complexity** and **traffic**. - -
+Zerops is a **developer-first Platform-as-a-Service**, running on bare metal, with every part built from scratch. Zerops aims to be the perfect mix of **developer experience**, **flexibility**, **scalability** and **affordability**, making it a great fit for applications of any size, complexity and traffic. ## Natively supported services @@ -115,8 +112,8 @@ items={storages} /> }, { type: 'link', - href: '/zerops-yml/specification', - label: 'zerops.yml', + href: '/zerops-yaml/specification', + label: 'zerops.yaml', customProps: { icon: Icons['document-text'], html: 'Configuration file placed to your repository, telling Zerops how to build and start your app.', @@ -164,7 +161,7 @@ You get a fully managed, professional infrastructure setup that will scale no ma ### ➡️ Granular resource configuration, autoscaling and high availability of services -Zerops has fully automatic horizontal and vertical scaling with configuration steps as small as 0.25 MB RAM and 1 CPU core. Your runtime services can go from a single container with 0.25 RAM and 1 CPU core to 10 containers each with 32 GB RAM and 10 CPU cores and then back in a matter of minutes. At the same time, all database and storage services are offered in well-crafted setups that go through performance optimizations while scaling and are available in both non-HA (single container) and high availability (multiple containers and balancers) modes. +Zerops has fully automatic horizontal and vertical scaling with configuration steps as small as 0.125 GB RAM and 1 CPU core. Your runtime services can go from a single container with 0.25 RAM and 1 CPU core to 10 containers each with 32 GB RAM and 10 CPU cores and then back in a matter of minutes. At the same time, all database and storage services are offered in well-crafted setups that go through performance optimizations while scaling and are available in both non-HA (single container) and high availability (multiple containers and balancers) modes. :::tip[**What does this mean for you?**] diff --git a/apps/docs/content/java/faq.mdx b/apps/docs/content/java/faq.mdx deleted file mode 100644 index 16d656d1c..000000000 --- a/apps/docs/content/java/faq.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Frequently Asked Questions -description: Get quick answers to your related questions about Java from frequently asked questions by people at Zerops. ---- - -import { FAQ, FAQItem } from '/src/components/Faq'; - - - sample answer - diff --git a/apps/docs/content/java/how-to/access.mdx b/apps/docs/content/java/how-to/access.mdx index 09e5ea13a..170d21017 100644 --- a/apps/docs/content/java/how-to/access.mdx +++ b/apps/docs/content/java/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Java service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Java service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Java service is not publicly accessible. When your application ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/java/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/java/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/java/how-to/build-pipeline.mdx b/apps/docs/content/java/how-to/build-pipeline.mdx index 8c39654df..07f79c3f4 100644 --- a/apps/docs/content/java/how-to/build-pipeline.mdx +++ b/apps/docs/content/java/how-to/build-pipeline.mdx @@ -8,11 +8,11 @@ import UnorderedList from '@site/src/components/UnorderedList'; Zerops provides a customizable build and runtime environment for your Java application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -72,9 +72,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -99,7 +99,7 @@ Following options are available for Java builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -117,12 +117,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -136,7 +136,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customize your build environment use the [prepareCommands](/java/how-to/build-pipeline#preparecommands) attribute. @@ -181,7 +181,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -222,7 +222,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -249,7 +249,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. Suppose your `mvnw` executable file is in a `cmd` directory. -```yml +```yaml buildCommands: - | cd cmd @@ -260,7 +260,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. Suppose your `mvnw` executable file is in a `cmd` directory. -```yml +```yaml buildCommands: - cd cmd - ./cmd/mvnw clean install @@ -270,7 +270,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/java/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `-X` debug option. -```yml +```yaml buildCommands: - ./mvnw -X clean install ``` @@ -281,7 +281,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -290,7 +290,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -298,7 +298,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - api - app.jar @@ -306,13 +306,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -324,19 +324,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -355,7 +355,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -382,7 +382,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -400,7 +400,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -430,7 +430,7 @@ Following options are available for Java builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -453,12 +453,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -478,7 +478,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customize your build environment use the `prepareCommands` attribute. @@ -548,7 +548,7 @@ _OPTIONAL._ Customizes the Java runtime environment by installing additional dep prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -602,14 +602,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -621,13 +621,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -667,7 +667,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -687,7 +687,7 @@ Read more about [environment variables](/java/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Java application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -723,7 +723,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -771,7 +771,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -800,7 +800,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -839,7 +839,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -887,7 +887,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/java/how-to/build-process.mdx b/apps/docs/content/java/how-to/build-process.mdx index f15046252..de164223c 100644 --- a/apps/docs/content/java/how-to/build-process.mdx +++ b/apps/docs/content/java/how-to/build-process.mdx @@ -24,9 +24,9 @@ The default Java build environment contains: - Git :::note -To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yml/specification#os-) attribute. +To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yaml/specification#os-) attribute. -Additional packages and tools can be installed using [build.prepareCommands](/zerops-yml/specification#preparecommands-). +Additional packages and tools can be installed using [build.prepareCommands](/zerops-yaml/specification#preparecommands-). ::: ## Description of the build process @@ -60,11 +60,11 @@ The build cancellation is available before the build pipeline is finished. When The default Java build environment contains: - {data.alpine.default} -- selected version of Java defined in `zerops.yml` [build.base](/java/how-to/build-pipeline#base) parameter +- selected version of Java defined in `zerops.yaml` [build.base](/java/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `git` and `wget` -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/java/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/java/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/java/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/java/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`. :::info The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file). @@ -110,7 +110,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/java/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/java/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the verbose `-X` debug option. -```yml +```yaml build: - ./mvnw -X clean install ``` diff --git a/apps/docs/content/java/how-to/create.mdx b/apps/docs/content/java/how-to/create.mdx index c31928ad7..6e55a0790 100644 --- a/apps/docs/content/java/how-to/create.mdx +++ b/apps/docs/content/java/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a Java runtime service with extensive build support. Java runtime is highly scalable and customisable to suit both development and production. @@ -81,33 +82,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
- + Java service always starts with the minimal resources. @@ -182,7 +157,7 @@ Zerops uses a yaml format to describe the project infrastructure. #### Basic example: -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -205,7 +180,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Java version 1 service with default [auto scaling](/java/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/java/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Java version 1 service with default [auto scaling](/java/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/java/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -214,7 +189,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -263,7 +238,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Java service and a [PostgreSQL](/postgresql/overview) service. -Java service with "app" hostname, the internal port(s) the service listens on will be defined later in the zerops.yml. Java service will run on version 1 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Java service with "app" hostname, the internal port(s) the service listens on will be defined later in the zerops.yaml. Java service will run on version 1 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -272,7 +247,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -304,7 +279,7 @@ The `project:` section is required. Only one project can be defined. Specifies the service type and version.
- See what [Java service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Java service types](/references/import-yaml/type-list#runtime-services) are currently supported. @@ -368,9 +343,9 @@ The `project:` section is required. Only one project can be defined. -### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -383,11 +358,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -403,7 +378,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -433,9 +408,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -449,4 +424,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/java/how-to/customize-runtime.mdx b/apps/docs/content/java/how-to/customize-runtime.mdx index ce1dff958..9401803b4 100644 --- a/apps/docs/content/java/how-to/customize-runtime.mdx +++ b/apps/docs/content/java/how-to/customize-runtime.mdx @@ -22,9 +22,9 @@ The default Java runtime environment contains: - Git :::note -To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yml/specification#os--1) attribute. +To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yaml/specification#os--1) attribute. -Additional packages and tools can be installed using [run.prepareCommands](/zerops-yml/specification#preparecommands--1). +Additional packages and tools can be installed using [run.prepareCommands](/zerops-yaml/specification#preparecommands--1). ::: ## Runtime Flow diff --git a/apps/docs/content/java/how-to/deploy-process.mdx b/apps/docs/content/java/how-to/deploy-process.mdx index b83f40e44..0d46b90f6 100644 --- a/apps/docs/content/java/how-to/deploy-process.mdx +++ b/apps/docs/content/java/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/java/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/java/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/java/how-to/build-pipeline#start), configure a [readiness check](/java/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/java/how-to/build-pipeline#start), configure a [readiness check](/java/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/java/how-to/env-variables.mdx b/apps/docs/content/java/how-to/env-variables.mdx index 21856739b..988d77126 100644 --- a/apps/docs/content/java/how-to/env-variables.mdx +++ b/apps/docs/content/java/how-to/env-variables.mdx @@ -23,12 +23,12 @@ There are 3 different sets of env variables in Zerops: basic build - zerops.yml + zerops.yaml basic runtime - zerops.yml + zerops.yaml secret @@ -41,13 +41,13 @@ There are 3 different sets of env variables in Zerops: Use the [secret env variables](/java/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/java/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/java/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

- - - Resources Type - Minimum resource - Maximum resource - - - - - CPU cores - 1 - 5 - - - RAM - 0.25 GB - 32 GB - - - Disk - 1 GB - 100 GB - - - - + Java service always starts with the minimal resources. @@ -207,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/java/how-to/shared-storage.mdx b/apps/docs/content/java/how-to/shared-storage.mdx index d206c54f0..b0749def2 100644 --- a/apps/docs/content/java/how-to/shared-storage.mdx +++ b/apps/docs/content/java/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Java service via the comma Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/java/how-to/create#create-a-project-description-file) how to define the Java service using the description.yml. +[Read the basics](/java/how-to/create#create-a-project-description-file) how to define the Java service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Java service and a shared storage -Follow the article [How to create a project based on the description.yml](/java/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/java/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/java/how-to/trigger-pipeline.mdx b/apps/docs/content/java/how-to/trigger-pipeline.mdx index 33741c78d..bfbd69aa0 100644 --- a/apps/docs/content/java/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/java/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/java/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/java/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/java/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/java/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/java/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/java/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/java/how-to/upgrade.mdx b/apps/docs/content/java/how-to/upgrade.mdx index fc1407182..d5bbe5cd0 100644 --- a/apps/docs/content/java/how-to/upgrade.mdx +++ b/apps/docs/content/java/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Java version description: Learn how to upgrade your java service's version --- -You can upgrade or downgrade your Java service to a different major Java version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/java/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Java version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Java version for your runtime. +You can upgrade or downgrade your Java service to a different major Java version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/java/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Java version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Java version for your runtime. -If you want to build your application with a different major Java version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Java version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/java/overview.mdx b/apps/docs/content/java/overview.mdx index 59c3805fc..26dfe86bd 100644 --- a/apps/docs/content/java/overview.mdx +++ b/apps/docs/content/java/overview.mdx @@ -25,9 +25,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-java-hello-world/blob/main/import-project/description.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-java-hello-world/blob/main/import-project/description.yaml)): -```yml +```yaml project: name: my-first-project services: @@ -98,12 +98,12 @@ Do you have any questions? Check the step-by-step tutorial, browse the documenta }, { type: 'link', - href: '/java/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'zerops.yml', + href: '/java/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -154,7 +154,7 @@ Have you build something that others might find useful? Don't hesitate to share - sample answer - diff --git a/apps/docs/content/keydb/how-to/create.mdx b/apps/docs/content/keydb/how-to/create.mdx index 3450046cc..2ceeb3f8b 100644 --- a/apps/docs/content/keydb/how-to/create.mdx +++ b/apps/docs/content/keydb/how-to/create.mdx @@ -5,6 +5,7 @@ description: Learn how you can create a keydb service in Zerops. import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; +import ResourceTable from '/src/components/ResourceTable'; [KeyDB ↗](https://docs.keydb.dev/) is a fully open source database, backed by Snap, and a faster drop in alternative to Redis. @@ -101,33 +102,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
- + For most cases, the default parameters will work without issues. If you need to limit the cost of the KeyDB service, lower the maximal resources. Zerops will never scale above the selected maximums. @@ -159,9 +134,9 @@ Zerops uses a yaml format file to describe the project infrastructure. #### Basic example -Create a directory `my-project`. Create a `description.yml` file inside the directory with the following content: +Create a directory `my-project`. Create a `description.yaml` file inside the directory with the following content: -```yml +```yaml # basic project data project: # project name @@ -180,9 +155,9 @@ The yaml file describes your future project infrastructure. The project will con #### Full example -Create a directory `my-project`. Create a `description.yml` file inside the directory with the following content: +Create a directory `my-project`. Create a `description.yaml` file inside the directory with the following content: -```yml +```yaml # basic project data project: # project name @@ -227,7 +202,7 @@ The hostname of the first service will be set to `keydb1`. The [high availabilit The hostname of the second service will be set to `keydb2`. The [single container](#single-container) mode will be chosen and the default [auto scaling configuration](/keydb/how-to/scale) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -259,7 +234,7 @@ The `project:` section is required. Only one project can be defined. -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains only KeyDB services but you can create a `description.yml` with [different types] of services. +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains only KeyDB services but you can create a `description.yaml` with [different types] of services. @@ -289,7 +264,7 @@ At least one service in `services:` section is required. You can create a projec @@ -349,9 +324,9 @@ At least one service in `services:` section is required. You can create a projec The KeyDB service **hostname** and **mode** are fixed after the service is created. They can't be changed later. ::: -### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -364,11 +339,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -384,7 +359,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```bash # array of project services @@ -400,9 +375,9 @@ services: The yaml file describes the list of one or more services that you want to add to your existing project. In the example above, one KeyDB service in the [single container mode](#single-container) with default [auto scaling](/keydb/how-to/scale) configuration will be added to your project. Hostname of the new service will be set to `keydb1`. -The content of the `services:` section of `import.yml` is identical to the [project description file](#create-a-project-description-file). The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the [project description file](#create-a-project-description-file). The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -416,4 +391,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the `import.yml` file is 100 kB. +Maximum size of the `import.yaml` file is 100 kB. diff --git a/apps/docs/content/keydb/how-to/export-import-data.mdx b/apps/docs/content/keydb/how-to/export-import-data.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/docs/content/keydb/how-to/scale.mdx b/apps/docs/content/keydb/how-to/scale.mdx index db07359b0..843e15ab6 100644 --- a/apps/docs/content/keydb/how-to/scale.mdx +++ b/apps/docs/content/keydb/how-to/scale.mdx @@ -4,6 +4,7 @@ description: Get to know how Zerops scales your keydb service. --- import Image from '/src/components/Image'; +import ResourceTable from '/src/components/ResourceTable'; Zerops performs an automated scaling of hardware resources required to run your database based on its usage. If the current use of your database does not require as much performance or disk space the auto scaling reduces the resources and thus reduces the costs. If your database is under heavy load or needs to store more data, then auto scaling increases the resources for the database to make sure it runs smoothly. @@ -38,33 +39,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: -
Specifies the service type and version.
- See what [KeyDB service types](/references/importyml/type-list#database-services) are currently supported. + See what [KeyDB service types](/references/import-yaml/type-list#database-services) are currently supported.
- - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
- + For most cases, the default parameters will work without issues. If you need to limit the cost of the KeyDB service, lower the maximal resources. Zerops will never scale above the selected maximums. @@ -128,7 +103,7 @@ Zerops monitors CPU, RAM and Disk usage in all running containers each 10 second The **scale up threshold** is derived from following **minimum free resources**: - 0.1 CPU core -- 0.25 GB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) +- 62.5 MB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) - 0.5 GB disk If the minimum free CPU, RAM or disk usage of a container is lower than the defined scale up threshold, Zerops scales the container up. @@ -138,7 +113,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the database is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/keydb/overview.mdx b/apps/docs/content/keydb/overview.mdx index d641c2567..6256cc69e 100644 --- a/apps/docs/content/keydb/overview.mdx +++ b/apps/docs/content/keydb/overview.mdx @@ -1,4 +1,112 @@ --- title: KeyDB overview -description: Learn about working with KeyDB with ease on Zerops. ---- \ No newline at end of file +description: Learn about working with KeyDB on Zerops. +--- + +import DocCardList from '@theme/DocCardList'; +import Icons from '@theme/Icon'; +import LargeCardList from '@site/src/components/LargeCardList'; +import LargeCard from '@site/src/components/LargeCard'; + +[KeyDB ↗](https://docs.keydb.dev/) is a fully open source database, a faster drop-in alternative to Redis. It offers enhanced performance, multithreading capabilities, and maintains full compatibility with Redis clients and APIs. + +:::important +While KeyDB is available on Zerops, please note that KeyDB development has not been very active recently. For new Redis-compatible deployments, we recommend considering [Valkey](/valkey/overview) as the preferred alternative due to its active development and ongoing support. +::: + +## Feature Highlights + + + +### Connect to KeyDB service + + + +## Popular Guides + + + +*Need help? Join our [Discord community](https://discord.gg/zeropsio).* \ No newline at end of file diff --git a/apps/docs/content/keydb/reference/cli.mdx b/apps/docs/content/keydb/reference/cli.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/docs/content/keydb/reference/import.mdx b/apps/docs/content/keydb/reference/import.mdx deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/docs/content/mariadb/faq.mdx b/apps/docs/content/mariadb/faq.mdx deleted file mode 100644 index 23f235534..000000000 --- a/apps/docs/content/mariadb/faq.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Frequently Asked Questions -description: Get quick answers to your related questions about MariaDb from frequently asked questions by people at Zerops. ---- - -import { FAQ, FAQItem } from '/src/components/Faq'; - - - sample answer - diff --git a/apps/docs/content/mariadb/how-to/create.mdx b/apps/docs/content/mariadb/how-to/create.mdx index 5f1bdd97c..db60287db 100644 --- a/apps/docs/content/mariadb/how-to/create.mdx +++ b/apps/docs/content/mariadb/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import Video from '@site/src/components/Video'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; +import ResourceTable from '/src/components/ResourceTable'; MariaDB is the open source relational database loved by developers all over the world. Created by MySQL’s original developers, MariaDB is compatible with MySQL and guaranteed to stay open source forever. @@ -109,6 +110,12 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: + + @@ -166,9 +173,9 @@ Zerops uses a yaml format file to describe the project infrastructure. #### Basic example -Create a directory `my-project`. Create a `description.yml` file inside the directory with the following content: +Create a directory `my-project`. Create a `description.yaml` file inside the directory with the following content: -```yml +```yaml # basic project data project: # project name @@ -187,9 +194,9 @@ The yaml file describes your future project infrastructure. The project will con #### Full example -Create a directory `my-project`. Create a `description.yml` file inside the directory with the following content: +Create a directory `my-project`. Create a `description.yaml` file inside the directory with the following content: -```yml +```yaml # basic project data project: # project name @@ -234,7 +241,7 @@ The hostname of the first service will be set to `mariadb1`. The [high availabil The hostname of the second service will be set to `mariadb2`. The [single container](#single-container) mode will be chosen and the default [auto scaling configuration](/mariadb/how-to/scale) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -266,7 +273,7 @@ The `project:` section is required. Only one project can be defined.
-At least one service in `services:` section is required. You can create a project with multiple services. The example above contains only MariaDB services but you can create a `description.yml` with [different types] of services. +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains only MariaDB services but you can create a `description.yaml` with [different types] of services. @@ -292,7 +299,7 @@ At least one service in `services:` section is required. You can create a projec @@ -360,9 +367,9 @@ At least one service in `services:` section is required. You can create a projec The MariaDB service **hostname** and **mode** are fixed after the service is created. They can't be changed later. ::: -### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -375,11 +382,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -396,7 +403,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```bash # array of project services @@ -412,9 +419,9 @@ services: The yaml file describes the list of one or more services that you want to add to your existing project. In the example above, one MariaDB 10.4 service in the [single container mode](#single-container) with default [auto scaling](/mariadb/how-to/scale) configuration will be added to your project. Hostname of the new service will be set to `mariadb1`. -The content of the `services:` section of `import.yml` is identical to the [project description file](#create-a-project-description-file). The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the [project description file](#create-a-project-description-file). The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -428,4 +435,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the `import.yml` file is 100 kB. +Maximum size of the `import.yaml` file is 100 kB. diff --git a/apps/docs/content/mariadb/how-to/manage.mdx b/apps/docs/content/mariadb/how-to/manage.mdx index 02e1c8428..d56604f78 100644 --- a/apps/docs/content/mariadb/how-to/manage.mdx +++ b/apps/docs/content/mariadb/how-to/manage.mdx @@ -29,7 +29,7 @@ To install Adminer into your project, open your project in Zerops GUI and select Copy the following yaml file into the text area and start the import: -```yml +```yaml services: - # Service will be accessible through zCLI VPN under: http://adminer hostname: adminer @@ -79,7 +79,7 @@ To install phpMyAdmin into your project, open your project in Zerops GUI and sel Copy the following yaml file into the text area and start the import: -```yml +```yaml services: - # Service will be accessible through zCLI VPN under: http://phpmyadmin hostname: phpmyadmin diff --git a/apps/docs/content/mariadb/how-to/scale.mdx b/apps/docs/content/mariadb/how-to/scale.mdx index aa3054039..6ba09e5da 100644 --- a/apps/docs/content/mariadb/how-to/scale.mdx +++ b/apps/docs/content/mariadb/how-to/scale.mdx @@ -4,6 +4,7 @@ description: Get to know how Zerops scales your mariadb service. --- import Image from '/src/components/Image'; +import ResourceTable from '/src/components/ResourceTable'; Zerops performs an automated scaling of hardware resources required to run your database based on its usage. If the current use of your database does not require as much performance or disk space the auto scaling reduces the resources and thus reduces the costs. If your database is under heavy load or needs to store more data, then auto scaling increases the resources for the database to make sure it runs smoothly. @@ -38,11 +39,11 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: -|   | Minimum resource | Maximum resource | -| ------------- | ---------------- | ---------------- | -| **CPU cores** | 1 | 5 | -| **RAM** | 0.5 GB | 32 GB | -| **Disk** | 1 GB | 100 GB | + For most cases, the default parameters will work without issues. If you need to limit the cost of the MariaDB service, lower the maximal resources. Zerops will never scale above the selected maximums. @@ -106,7 +107,7 @@ Zerops monitors CPU, RAM and Disk usage in all running containers each 10 second The **scale up threshold** is derived from following **minimum free resources**: - 0.1 CPU core -- 0.25 GB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) +- 0.125 GB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) - 0.5 GB disk If the minimum free CPU, RAM or disk usage of a container is lower than the defined scale up threshold, Zerops scales the container up. @@ -116,7 +117,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the database is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/mariadb/overview.mdx b/apps/docs/content/mariadb/overview.mdx index 9597755ba..0c5a9ea3a 100644 --- a/apps/docs/content/mariadb/overview.mdx +++ b/apps/docs/content/mariadb/overview.mdx @@ -112,7 +112,7 @@ Have you build something that others might find useful? Don't hesitate to share + +Import configuration version: + + +## Service Configuration + +Our NATS implementation features optimized default settings designed for common use cases. + +**Key configuration aspects** include: +- Standard protocol port `4222` for client connections +- HTTP monitoring interface `8222` for management +- Secure authentication with automatically generated credentials +- Optimized settings for performance and reliability + +You can fine-tune your NATS service by adjusting **environment variables**: + +### Available Configuration Options + +:::note +If certain variables are not visible in your configuration, they may have been introduced after your service was created. Simply add them as [secret variables](/features/env-variables#2-secret-variables) to access the functionality. +::: + +
type Specifies the service type and version. - See what [MariaDB service types](/references/importyml/type-list#database-services) are currently supported. + See what [MariaDB service types](/references/import-yaml/type-list#database-services) are currently supported.
+ + + + + + + + + + + + + + + + +
VariableDescription
MAX_PAYLOADDefines the maximum allowed message size for all NATS traffic. Default: 8MB, Maximum: 64MB. See NATS limits documentation for details.
JET_STREAM_ENABLEDControls whether JetStream functionality is enabled. Default: 1 (enabled), Set to 0 to disable. See JetStream Configuration section below for more details.
+ +:::important +Configuration changes require a service **restart** to take effect. While NATS itself supports configuration hot-reload, this feature will be implemented in a future Zerops update. +::: + +After restarting, check your service logs to confirm the changes were applied successfully. + +### JetStream Configuration + +The service includes [JetStream](https://docs.nats.io/nats-concepts/jetstream) functionality **enabled by default**, providing persistent storage capabilities for your messaging workloads: +- **Memory store**: Up to 40GB for high-performance message caching +- **File store**: Up to 250GB for persistent storage +- **Regular sync intervals**: Ensures data durability and consistency + +:::note +In HA deployments, data persistence is further enhanced with 1-minute sync intervals across all nodes, ensuring robust data durability and high availability. +::: + +This configuration provides a robust foundation for message persistence while balancing performance and reliability. + +:::tip +Disabling JetStream can reduce resource utilization for applications that don't require message persistence. +::: + +### Deployment Modes + +:::warning +Deployment mode is selected during service creation and cannot be changed later. +::: + +#### Non-HA Mode +- Suitable for development and testing +- Data persistence not guaranteed during node failures +- Lower resource requirements + +#### HA Mode +- Creates a multi-node NATS cluster +- Configures routes between cluster nodes automatically +- Implements [NATS clustering](https://docs.nats.io/running-a-nats-service/configuration/clustering) for high availability +- Provides improved reliability compared to non-HA deployments + +### Authentication Management + +Authentication credentials are automatically generated and managed by the platform. The system creates a default user (`zerops`) with a secure 16-character password. You can access these credentials through: +- The service access details in the Zerops GUI +- Environment variables in your service configuration: + - `user` - Username for authentication (default: "zerops") + - `password` - Generated secure password + - `connectionString` - Complete connection string in the format `nats://${dbUser}:${dbPassword}@${hostname}:${port}` + +## Health Monitoring + +Zerops continuously monitors your NATS service health using built-in health checks: + +- **HTTP Health Check**: The system checks the `/healthz` endpoint at port 8222 +- **Self-Healing**: The platform automatically recovers unhealthy nodes when issues are detected + +### Health Status + +You can check the health status of your NATS service: + +1. Through the Zerops GUI dashboard +2. By accessing the management interface at port `8222` + +## Backup and Recovery + +Zerops provides built-in backup functionality for your NATS JetStream data, ensuring your message streams and configurations can be safely preserved and restored when needed. + +### Backup Process + +Backups are created in `.tar.gz` format using the `nats` backup command. They are saved to local disk, compressed, streamed to backup storage, and then deleted locally. + +For general information about backup frequency and storage limits, see our [Backup documentation](/features/backup). + +## Support + +For advanced configurations or custom requirements: +- Join our [Discord community](https://discord.gg/zerops) +- Contact support via [email](mailto:support@zerops.io) \ No newline at end of file diff --git a/apps/docs/content/nginx/how-to/access.mdx b/apps/docs/content/nginx/how-to/access.mdx index f8a1c0a58..fe84265b9 100644 --- a/apps/docs/content/nginx/how-to/access.mdx +++ b/apps/docs/content/nginx/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Nginx static service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Nginx static service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Nginx static service is not publicly accessible. When your appl ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/nginx/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/nginx/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/nginx/how-to/build-pipeline.mdx b/apps/docs/content/nginx/how-to/build-pipeline.mdx index 5cfce5caa..105a3c29d 100644 --- a/apps/docs/content/nginx/how-to/build-pipeline.mdx +++ b/apps/docs/content/nginx/how-to/build-pipeline.mdx @@ -26,11 +26,11 @@ Zerops supports different build environments: If you just need to deploy your static content, use the [manual deploy](/nginx/how-to/trigger-pipeline#manual-deploy-using-zerops-cli) via Zerops CLI. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -95,9 +95,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -123,7 +123,7 @@ Following options are available for Nginx builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -146,12 +146,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -171,7 +171,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customize your build environment use the `prepareCommands` attribute. @@ -250,7 +250,7 @@ _OPTIONAL._ Customizes the Nginx runtime environment by installing additional de additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -311,14 +311,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the build section of your chosen technology. -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -330,13 +330,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -381,7 +381,7 @@ By default, the document root is configured to `/var/www`. Customize the folder that will be used as the root of the publicly accessible web server content. Enter the path relative to the `/var/www` folder. E.g. `documentRoot: public` will set the web server document root to `/var/www/public`. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -412,7 +412,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -449,7 +449,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -498,7 +498,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -545,7 +545,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -593,7 +593,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/nginx/how-to/create.mdx b/apps/docs/content/nginx/how-to/create.mdx index fcd27efeb..239fca9df 100644 --- a/apps/docs/content/nginx/how-to/create.mdx +++ b/apps/docs/content/nginx/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; The Nginx static service contains the Nginx web server optimized for your static content. Nginx static service is highly scalable and customisable to suit both development and production. @@ -81,33 +82,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
- + Nginx static service always starts with the minimal resources. @@ -182,7 +157,7 @@ Zerops uses a yaml format to describe the project infrastructure. #### Basic example: -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -205,7 +180,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Nginx version 8.1 service with default [auto scaling](/nginx/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/nginx/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Nginx version 8.1 service with default [auto scaling](/nginx/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/nginx/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -214,7 +189,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -255,14 +230,14 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain an Nginx static service with `app` hostname. The internal port(s) the service listens on will be defined later in the [zerops.yml](/nginx/how-to/build-pipeline#ports). Nginx static service will run on version 1.22 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain an Nginx static service with `app` hostname. The internal port(s) the service listens on will be defined later in the [zerops.yaml](/nginx/how-to/build-pipeline#ports). Nginx static service will run on version 1.22 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -294,7 +269,7 @@ The `project:` section is required. Only one project can be defined. -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains an Nginx static service but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains an Nginx static service but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -324,7 +299,7 @@ At least one service in `services:` section is required. You can create a projec @@ -406,9 +381,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [nginx service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [nginx service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -421,11 +396,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -442,7 +417,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -472,9 +447,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -488,4 +463,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/nginx/how-to/customize-runtime.mdx b/apps/docs/content/nginx/how-to/customize-runtime.mdx index a5e1b502b..e6338b809 100644 --- a/apps/docs/content/nginx/how-to/customize-runtime.mdx +++ b/apps/docs/content/nginx/how-to/customize-runtime.mdx @@ -22,9 +22,9 @@ The default Nginx runtime environment contains: - Git and Composer :::note -To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yml/specification#os--1) attribute. +To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yaml/specification#os--1) attribute. -Additional packages and tools can be installed using [run.prepareCommands](/zerops-yml/specification#preparecommands--1). +Additional packages and tools can be installed using [run.prepareCommands](/zerops-yaml/specification#preparecommands--1). ::: ### Runtime Flow diff --git a/apps/docs/content/nginx/how-to/customize-web-server.mdx b/apps/docs/content/nginx/how-to/customize-web-server.mdx index fa4748120..dfb9988b2 100644 --- a/apps/docs/content/nginx/how-to/customize-web-server.mdx +++ b/apps/docs/content/nginx/how-to/customize-web-server.mdx @@ -26,7 +26,7 @@ server { The configuration contains 2 variables: -- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yml`. If the attribute is not specified, the default value `/var/www` is used. +- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yaml`. If the attribute is not specified, the default value `/var/www` is used. ## Customize Nginx configuration @@ -36,7 +36,7 @@ Follow these steps to customize the Nginx configuration in Nginx static service: 2. Optionally use following variables: -- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yml`. If the attribute is not specified, the default value `/var/www` is used. +- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yaml`. If the attribute is not specified, the default value `/var/www` is used. Example: @@ -44,7 +44,7 @@ Example: root {{.DocumentRoot}}; ``` -- **`{{.Environment.ENV_NAME}}`** is replaced by the [env variable](/nginx/how-to/env-variables) value. The env variable must be either defined in [run.envVariables](/nginx/how-to/build-pipeline#envvariables) in `zerops.yml` or set as a [secret](/nginx/how-to/env-variables#set-secret-env-variables-in-zerops-gui) or [generated](/nginx/how-to/env-variables#generated-env-variables) env variable in Zerops GUI. +- **`{{.Environment.ENV_NAME}}`** is replaced by the [env variable](/nginx/how-to/env-variables) value. The env variable must be either defined in [run.envVariables](/nginx/how-to/build-pipeline#envvariables) in `zerops.yaml` or set as a [secret](/nginx/how-to/env-variables#set-secret-env-variables-in-zerops-gui) or [generated](/nginx/how-to/env-variables#generated-env-variables) env variable in Zerops GUI. :::caution Use the **.tmpl** file extension to make Zerops interpret the file as a template. Zerops will replace the supported variables listed above. @@ -53,12 +53,12 @@ Use the **.tmpl** file extension to make Zerops interpret the file as a template 3. Check that your Nginx configuration is consistent with Zerops requirements: - Do not use IP addresses in the `listen` directive -- If you use other ports than `:80` in the `listen` directive, add them to the `run.ports` in your `zerops.yml` as well. +- If you use other ports than `:80` in the `listen` directive, add them to the `run.ports` in your `zerops.yaml` as well. - Do not use the port **:443**. All the incoming `https://` traffic is terminated on the Zerops internal balancer where the SSL certificate is installed and the request is forwarded to your Nginx static service as a **http://** on the port **:80**. -4. Add the `siteConfigPath` to the run section of your `zerops.yml` +4. Add the `siteConfigPath` to the run section of your `zerops.yaml` -```yml +```yaml zerops: # define hostname of your service - setup: app diff --git a/apps/docs/content/nginx/how-to/deploy-process.mdx b/apps/docs/content/nginx/how-to/deploy-process.mdx index 35a54cc90..4506db6e4 100644 --- a/apps/docs/content/nginx/how-to/deploy-process.mdx +++ b/apps/docs/content/nginx/how-to/deploy-process.mdx @@ -38,7 +38,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/nginx/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/nginx/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -56,7 +56,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready as soon as it is started, configure a [readiness check](/nginx/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready as soon as it is started, configure a [readiness check](/nginx/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -92,7 +92,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/nginx/how-to/env-variables.mdx b/apps/docs/content/nginx/how-to/env-variables.mdx index a6d396ec5..b29e27ed9 100644 --- a/apps/docs/content/nginx/how-to/env-variables.mdx +++ b/apps/docs/content/nginx/how-to/env-variables.mdx @@ -23,12 +23,12 @@ There are 3 different sets of env variables in Zerops: basic build - zerops.yml + zerops.yaml basic runtime - zerops.yml + zerops.yaml secret @@ -41,13 +41,13 @@ There are 3 different sets of env variables in Zerops: Use the [secret env variables](/nginx/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/nginx/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/nginx/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

- - - Resources Type - Minimum resource - Maximum resource - - - - - CPU cores - 1 - 5 - - - RAM - 0.25 GB - 32 GB - - - Disk - 1 GB - 100 GB - - - - + Nginx static service always starts with the minimal resources. @@ -197,7 +172,7 @@ Zerops monitors CPU, RAM and Disk usage in all running containers each 10 second The **scale up threshold** is derived from following **minimum free resources**: - 0.1 CPU core -- 0.125 GB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) +- 62.5 MB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) - 0.5 GB disk If the minimum free CPU, RAM or disk usage of a container is lower than the defined scale up threshold, Zerops scales the container up. @@ -207,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/nginx/how-to/shared-storage.mdx b/apps/docs/content/nginx/how-to/shared-storage.mdx index 1266d4c2f..829037485 100644 --- a/apps/docs/content/nginx/how-to/shared-storage.mdx +++ b/apps/docs/content/nginx/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Nginx static service via t Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/nginx/how-to/create#create-a-project-description-file) how to define the Nginx static service using the description.yml. +[Read the basics](/nginx/how-to/create#create-a-project-description-file) how to define the Nginx static service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with Nginx static service and a shared storage -Follow the article [How to create a project based on the description.yml](/nginx/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/nginx/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/nginx/how-to/trigger-pipeline.mdx b/apps/docs/content/nginx/how-to/trigger-pipeline.mdx index f58a45069..1a2531ddb 100644 --- a/apps/docs/content/nginx/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/nginx/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/nginx/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/nginx/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/nginx/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/nginx/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/nginx/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/nginx/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/nginx/how-to/upgrade.mdx b/apps/docs/content/nginx/how-to/upgrade.mdx index 2b54b24cd..cac7327eb 100644 --- a/apps/docs/content/nginx/how-to/upgrade.mdx +++ b/apps/docs/content/nginx/how-to/upgrade.mdx @@ -3,4 +3,4 @@ title: How to upgrade the Nginx version description: Learn how to upgrade your nginx service's version --- -You can upgrade or downgrade your Nginx static service to a different major Nginx version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/nginx/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Nginx version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Nginx version for your runtime. +You can upgrade or downgrade your Nginx static service to a different major Nginx version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/nginx/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Nginx version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Nginx version for your runtime. diff --git a/apps/docs/content/nginx/overview.mdx b/apps/docs/content/nginx/overview.mdx index 346e7153d..6b770f1cb 100644 --- a/apps/docs/content/nginx/overview.mdx +++ b/apps/docs/content/nginx/overview.mdx @@ -54,12 +54,12 @@ The Nginx static service contains the [Nginx ↗](https://nginx.org/) web server }, { type: 'link', - href: '/nginx/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'zerops.yml', + href: '/nginx/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -119,7 +119,7 @@ Have you build something that others might find useful? Don't hesitate to share 2. Create a project.

- Learn more about projects in Zerops. See how to + Learn more about projects in Zerops. See how to import a whole project into Zerops.

@@ -31,7 +31,7 @@ In the detail of each step, you can find a link with more information about the
3. In the left menu, click on Import services, copy & paste the - contents of the `import-services.yml` config file from the recipe + contents of the `import-services.yaml` config file from the recipe repository of your choice. Then click on Import service.

diff --git a/apps/docs/content/nginx/tutorial/step-by-step.mdx b/apps/docs/content/nginx/tutorial/step-by-step.mdx index 6bae21cd3..858975240 100644 --- a/apps/docs/content/nginx/tutorial/step-by-step.mdx +++ b/apps/docs/content/nginx/tutorial/step-by-step.mdx @@ -23,7 +23,7 @@ In the detail of each step, you can find a link with more information about the

2. Create a project.

- Learn more about projects in + Learn more about projects in Zerops. See how to import a whole project into Zerops.

@@ -31,7 +31,7 @@ In the detail of each step, you can find a link with more information about the
3. In the left menu, click on Import services, copy & paste the - contents of this yaml file and click on Import service. + contents of this yaml file and click on Import service.

Learn more about services in Zerops and how to import a service to an existing project. diff --git a/apps/docs/content/nodejs/faq.mdx b/apps/docs/content/nodejs/faq.mdx deleted file mode 100644 index 8095ce1d6..000000000 --- a/apps/docs/content/nodejs/faq.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Frequently Asked Questions -description: Get quick answers to your related questions about Node.js from frequently asked questions by people at Zerops. ---- - -import { FAQ, FAQItem } from '/src/components/Faq'; - - - sample answer - diff --git a/apps/docs/content/nodejs/how-to/access.mdx b/apps/docs/content/nodejs/how-to/access.mdx index 2cfda64c8..6af3ee886 100644 --- a/apps/docs/content/nodejs/how-to/access.mdx +++ b/apps/docs/content/nodejs/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Node.js service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Node.js service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Node.js service is not publicly accessible. When your applicati ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/nodejs/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/nodejs/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/nodejs/how-to/build-pipeline.mdx b/apps/docs/content/nodejs/how-to/build-pipeline.mdx index ed0b7c3c6..0b6981a37 100644 --- a/apps/docs/content/nodejs/how-to/build-pipeline.mdx +++ b/apps/docs/content/nodejs/how-to/build-pipeline.mdx @@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your Node.js application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -78,9 +78,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -105,7 +105,7 @@ Following options are available for Node.js builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -122,12 +122,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -141,7 +141,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customize your build environment use the [prepareCommands](/nodejs/how-to/build-pipeline#preparecommands) attribute. @@ -186,7 +186,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -227,7 +227,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -255,7 +255,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml buildCommands: - | npm i @@ -266,7 +266,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml buildCommands: - npm i - npm run build @@ -276,7 +276,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/nodejs/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the --verbose option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build @@ -288,7 +288,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -299,7 +299,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -307,7 +307,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - dist - package.json @@ -315,13 +315,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -333,19 +333,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -364,7 +364,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -391,7 +391,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -409,7 +409,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -440,7 +440,7 @@ Following options are available for Node.js builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -463,12 +463,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -488,7 +488,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customize your build environment use the `prepareCommands` attribute. @@ -555,7 +555,7 @@ _OPTIONAL._ Customises the Node.js runtime environment by installing additional additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -609,14 +609,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -628,13 +628,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -674,7 +674,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -695,7 +695,7 @@ Read more about [environment variables](/nodejs/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Node.js application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -731,7 +731,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -779,7 +779,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -808,7 +808,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -847,7 +847,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -895,7 +895,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/nodejs/how-to/build-process.mdx b/apps/docs/content/nodejs/how-to/build-process.mdx index 30585ec4f..d3c4f8112 100644 --- a/apps/docs/content/nodejs/how-to/build-process.mdx +++ b/apps/docs/content/nodejs/how-to/build-process.mdx @@ -24,9 +24,9 @@ The default NodeJS build environment contains: - NPM, Yarn, Git and NPX tools :::note -To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yml/specification#os-) attribute. +To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yaml/specification#os-) attribute. -Additional packages and tools can be installed using [build.prepareCommands](/zerops-yml/specification#preparecommands-). +Additional packages and tools can be installed using [build.prepareCommands](/zerops-yaml/specification#preparecommands-). ::: @@ -70,11 +70,11 @@ The build cancellation is available before the build pipeline is finished. When The default Node.js build environment contains: - {data.alpine.default} -- selected version of Node.js defined in `zerops.yml` [build.base](/nodejs/how-to/build-pipeline#base) parameter +- selected version of Node.js defined in `zerops.yaml` [build.base](/nodejs/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `npm`, `yarn`, `git` and `npx` tools -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/nodejs/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/nodejs/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/nodejs/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/nodejs/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`. :::info The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file). @@ -120,7 +120,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/nodejs/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/nodejs/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `--verbose` option. -```yml +```yaml buildCommands: - npm i --verbose - npm run build diff --git a/apps/docs/content/nodejs/how-to/create.mdx b/apps/docs/content/nodejs/how-to/create.mdx index f5124b952..7dda722a1 100644 --- a/apps/docs/content/nodejs/how-to/create.mdx +++ b/apps/docs/content/nodejs/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a powerful Node.js runtime service with extensive build support. The Node.js runtime is highly scalable and customizable to suit your development and production needs. With just a few clicks or commands, you can have a production-ready Node.js environment up and running in no time. @@ -81,32 +82,7 @@ You can choose the CPU mode when starting a new service or change it later. The Vertical auto scaling has the following default configuration: - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
+ Node.js services always start with the minimal resources. @@ -183,7 +159,7 @@ Zerops uses a YAML format to describe the project infrastructure. #### Basic example: -Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yml` file with the following content: +Create a directory called `my-project`. Inside the `my-project` directory, create a `description.yaml` file with the following content: ```yaml # basic project data project: @@ -205,7 +181,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Node.js version 20 service with default [auto scaling](/nodejs/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/nodejs/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Node.js version 20 service with default [auto scaling](/nodejs/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/nodejs/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -214,7 +190,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -263,7 +239,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Node.js service and a [PostgreSQL](/postgresql/overview) service. -Node.js service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yml](/nodejs/how-to/build-pipeline#ports). Node.js service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Node.js service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yaml](/nodejs/how-to/build-pipeline#ports). Node.js service will run on version 20 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -272,7 +248,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -303,7 +279,7 @@ The `project:` section is required. Only one project can be defined. -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Node.js and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Node.js and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -333,7 +309,7 @@ At least one service in `services:` section is required. You can create a projec @@ -397,9 +373,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [Node.js service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Node.js service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -412,11 +388,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -432,7 +408,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -462,9 +438,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -478,4 +454,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/nodejs/how-to/customize-runtime.mdx b/apps/docs/content/nodejs/how-to/customize-runtime.mdx index 244ca7b16..e05746965 100644 --- a/apps/docs/content/nodejs/how-to/customize-runtime.mdx +++ b/apps/docs/content/nodejs/how-to/customize-runtime.mdx @@ -24,9 +24,9 @@ The default Node.js runtime environment contains: - NPM, Yarn, Git and NPX tools :::note -To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yml/specification#os--1) attribute. +To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yaml/specification#os--1) attribute. -Additional packages and tools can be installed using [run.prepareCommands](/zerops-yml/specification#preparecommands--1). +Additional packages and tools can be installed using [run.prepareCommands](/zerops-yaml/specification#preparecommands--1). ::: When the first deploy with a defined `prepareCommands` attribute is triggered, Zerops will diff --git a/apps/docs/content/nodejs/how-to/deploy-process.mdx b/apps/docs/content/nodejs/how-to/deploy-process.mdx index 5f47d7c00..37570a105 100644 --- a/apps/docs/content/nodejs/how-to/deploy-process.mdx +++ b/apps/docs/content/nodejs/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/nodejs/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/nodejs/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/nodejs/how-to/build-pipeline#start), configure a [readiness check](/nodejs/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/nodejs/how-to/build-pipeline#start), configure a [readiness check](/nodejs/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/nodejs/how-to/env-variables.mdx b/apps/docs/content/nodejs/how-to/env-variables.mdx index 9533838ee..093c98d1b 100644 --- a/apps/docs/content/nodejs/how-to/env-variables.mdx +++ b/apps/docs/content/nodejs/how-to/env-variables.mdx @@ -23,12 +23,12 @@ There are 3 different sets of env variables in Zerops: basic build - zerops.yml + zerops.yaml basic runtime - zerops.yml + zerops.yaml secret @@ -40,13 +40,13 @@ There are 3 different sets of env variables in Zerops: Use the [secret env variables](/nodejs/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/nodejs/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/nodejs/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

- - - Resources Type - Minimum resource - Maximum resource - - - - - CPU cores - 1 - 5 - - - RAM - 0.25 GB - 32 GB - - - Disk - 1 GB - 100 GB - - - - + Node.js service always starts with the minimal resources. @@ -207,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/nodejs/how-to/shared-storage.mdx b/apps/docs/content/nodejs/how-to/shared-storage.mdx index 88b5dbb90..071ac24a5 100644 --- a/apps/docs/content/nodejs/how-to/shared-storage.mdx +++ b/apps/docs/content/nodejs/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Node.js service via the co Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/nodejs/how-to/create#create-a-project-description-file) how to define the Node.js service using the description.yml. +[Read the basics](/nodejs/how-to/create#create-a-project-description-file) how to define the Node.js service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Node.js service and a shared storage -Follow the article [How to create a project based on the description.yml](/nodejs/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/nodejs/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/nodejs/how-to/trigger-pipeline.mdx b/apps/docs/content/nodejs/how-to/trigger-pipeline.mdx index d6d85e4f4..b60bf7136 100644 --- a/apps/docs/content/nodejs/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/nodejs/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/nodejs/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/nodejs/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/nodejs/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/nodejs/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/nodejs/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/nodejs/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/nodejs/how-to/upgrade.mdx b/apps/docs/content/nodejs/how-to/upgrade.mdx index 2d100b1da..1defee315 100644 --- a/apps/docs/content/nodejs/how-to/upgrade.mdx +++ b/apps/docs/content/nodejs/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Node.js version description: Learn how to upgrade your node.js service's version --- -You can upgrade or downgrade your Node.js service to a different major Node.js version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/nodejs/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Node.js version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Node.js version for your runtime. +You can upgrade or downgrade your Node.js service to a different major Node.js version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/nodejs/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Node.js version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Node.js version for your runtime. -If you want to build your application with a different major Node.js version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Node.js version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/nodejs/overview.mdx b/apps/docs/content/nodejs/overview.mdx index e4650e8c3..2bf3cf77a 100644 --- a/apps/docs/content/nodejs/overview.mdx +++ b/apps/docs/content/nodejs/overview.mdx @@ -25,9 +25,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-nodejs/blob/main/zerops-project-import.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-nodejs/blob/main/zerops-project-import.yaml)): -```yml +```yaml project: name: recipe-nodejs tags: @@ -116,12 +116,12 @@ It doesn't matter whether it's your first curious introduction to Zerops, you ha }, { type: 'link', - href: '/nodejs/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'zerops.yml', + href: '/nodejs/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -172,7 +172,7 @@ Have you build something that others might find useful? Don't hesitate to share -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains only Object storage service but you can create a description.yml with different types of services. +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains only Object storage service but you can create a description.yaml with different types of services. @@ -305,9 +305,9 @@ Each Object storage service can only contain one bucket. If your application nee Bucket will be created with a name based on the given service name and a random prefix. The name of the bucket cannot be changed later. -### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -320,11 +320,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -339,9 +339,9 @@ If you have access to more than one client, you must specify the client ID for w ### Add Object service to an existing project -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # array of project services services: - # service name @@ -362,9 +362,9 @@ services: The yaml file describes the list of one or more services that you want to add to your existing project. In the example above, one Object storage service named upload will be created. The bucket quota will be set to 73 GB and the bucket access policy will be set to `public-write`. -The content of the `services:` section of `import.yml` is identical to the [project description file]. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the [project description file]. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -378,11 +378,11 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the `import.yml` file is 100 kB. +Maximum size of the `import.yaml` file is 100 kB. #### Example -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```bash # array of project services @@ -396,4 +396,4 @@ services: The yaml file describes the list of one or more services that you want to add to your existing project. In the example above, one Object storage service in the single container mode with default auto scaling configuration will be added to your project. Hostname of the new service will be set to `storage`. -The content of the `services:` section of `import.yml` is identical to the [project description file](#create-a-project-description-file). The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the [project description file](#create-a-project-description-file). The `import.yaml` never contains the `project:` section because the project already exists. diff --git a/apps/docs/content/object-storage/how-to/update-bucket.mdx b/apps/docs/content/object-storage/how-to/update-bucket.mdx index 472e1cb15..52ba1ded3 100644 --- a/apps/docs/content/object-storage/how-to/update-bucket.mdx +++ b/apps/docs/content/object-storage/how-to/update-bucket.mdx @@ -52,7 +52,7 @@ Or you can set your own access policy in the [IAM Policy JSON format](https://mi #### Example: -```yml +```yaml { 'Version': '2012-10-17', 'Statement': diff --git a/apps/docs/content/object-storage/overview.mdx b/apps/docs/content/object-storage/overview.mdx index 5e0c14ef1..1be0a2d07 100644 --- a/apps/docs/content/object-storage/overview.mdx +++ b/apps/docs/content/object-storage/overview.mdx @@ -81,7 +81,7 @@ Have you build something that others might find useful? Don't hesitate to share - sample answer - diff --git a/apps/docs/content/php/how-to/access.mdx b/apps/docs/content/php/how-to/access.mdx index 65a8d99f7..5414a5a22 100644 --- a/apps/docs/content/php/how-to/access.mdx +++ b/apps/docs/content/php/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your PHP service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your PHP service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your PHP service is not publicly accessible. When your application i ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/php/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/php/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/php/how-to/build-pipeline.mdx b/apps/docs/content/php/how-to/build-pipeline.mdx index 86aad20a1..edc3b65e0 100644 --- a/apps/docs/content/php/how-to/build-pipeline.mdx +++ b/apps/docs/content/php/how-to/build-pipeline.mdx @@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your PHP application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -76,9 +76,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -103,7 +103,7 @@ Following options are available for PHP builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -120,12 +120,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -139,7 +139,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customise your build environment use the [prepareCommands](/php/how-to/build-pipeline#preparecommands) attribute. @@ -184,7 +184,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -225,7 +225,7 @@ You can configure your prepare commands to be run in a single shell instance or _REQUIRED._ Defines build commands. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -252,7 +252,7 @@ Before the build commands are triggered the build container contains: Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml buildCommands: - | composer install --optimize-autoloader --no-dev @@ -263,7 +263,7 @@ buildCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml buildCommands: - composer install --optimize-autoloader --no-dev - php artisan env @@ -273,7 +273,7 @@ buildCommands: If any command fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/php/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the verbose option. -```yml +```yaml buildCommands: - composer install -v ``` @@ -284,7 +284,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -294,7 +294,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -302,7 +302,7 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - public - file.txt @@ -310,13 +310,13 @@ deployFiles: Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -328,19 +328,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -359,7 +359,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -386,7 +386,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -404,7 +404,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -436,7 +436,7 @@ Following options are available for PHP builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -459,12 +459,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -484,7 +484,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customise your build environment use the `prepareCommands` attribute. @@ -563,7 +563,7 @@ _OPTIONAL._ Customises the PHP runtime environment by installing additional depe additional packages or tools add one or more prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -624,14 +624,14 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app # ==== how to build your application ==== build: ... - addToRunPrepare: ./runtime-config.yml + addToRunPrepare: ./runtime-config.yaml # ==== how to run your application ==== run: @@ -643,13 +643,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -694,7 +694,7 @@ By default, the document root is configured to `/var/www`. Customize the folder that will be used as the root of the publicly accessible web server content. Enter the path relative to the `/var/www` folder. E.g. `documentRoot: public` will set the web server document root to `/var/www/public`. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -725,7 +725,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -763,7 +763,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -812,7 +812,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -842,7 +842,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -881,7 +881,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -929,7 +929,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/php/how-to/build-process.mdx b/apps/docs/content/php/how-to/build-process.mdx index 510b3e25b..836cf65cf 100644 --- a/apps/docs/content/php/how-to/build-process.mdx +++ b/apps/docs/content/php/how-to/build-process.mdx @@ -35,14 +35,14 @@ The build cancellation is available before the build pipeline is finished. When The default PHP build environment contains: - {data.alpine.default} -- selected version of PHP defined in `zerops.yml` [build.base](/php/how-to/build-pipeline#base) parameter +- selected version of PHP defined in `zerops.yaml` [build.base](/php/how-to/build-pipeline#base) parameter - Git and Composer - [zCLI](/references/cli) :::note -To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yml/specification#os-) attribute. +To use Ubuntu instead of the default Alpine, set the [build.os](/zerops-yaml/specification#os-) attribute. -Additional packages and tools can be installed using [build.prepareCommands](/zerops-yml/specification#preparecommands-). +Additional packages and tools can be installed using [build.prepareCommands](/zerops-yaml/specification#preparecommands-). ::: ## PHP build hardware resources @@ -85,7 +85,7 @@ This will force Zerops to run the next build clean, including all prepare comman If any [build command](/php/how-to/build-pipeline#buildcommands) fails, it returns an exit code other than 0 and the build is canceled. Read the [build log](/php/how-to/logs#build-log) to troubleshoot the error. If the error log doesn't contain any specific error message, try to run your build with the `-v` verbose option. -```yml +```yaml buildCommands: - composer install -v ``` diff --git a/apps/docs/content/php/how-to/create.mdx b/apps/docs/content/php/how-to/create.mdx index 7fc7143b5..7365b4778 100644 --- a/apps/docs/content/php/how-to/create.mdx +++ b/apps/docs/content/php/how-to/create.mdx @@ -6,6 +6,7 @@ description: Learn how you can create a php service in Zerops. import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides 2 PHP services with an included web server: **PHP+Nginx** and **PHP+Apache**. PHP runtime is highly scalable and customisable to suit both development and production. @@ -77,33 +78,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: -
- - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB
- + PHP service always starts with the minimal resources. @@ -180,7 +155,7 @@ Zerops uses a yaml format to describe the project infrastructure. #### Basic example: -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -203,7 +178,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one PHP version 8.1 service with default [auto scaling](/php/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/php/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one PHP version 8.1 service with default [auto scaling](/php/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/php/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -212,7 +187,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -261,7 +236,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a PHP service and a [PostgreSQL](/postgresql/overview) service. -PHP service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yml](/php/how-to/build-pipeline#ports). PHP service will run on version 8.1 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +PHP service with "app" hostname, the internal port(s) the service listens on will be defined later in the [zerops.yaml](/php/how-to/build-pipeline#ports). PHP service will run on version 8.1 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -270,7 +245,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -302,7 +277,7 @@ The `project:` section is required. Only one project can be defined. -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains PHP and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains PHP and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -332,7 +307,7 @@ At least one service in `services:` section is required. You can create a projec @@ -396,9 +371,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [PHP service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [PHP service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -411,11 +386,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -432,7 +407,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -462,9 +437,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -478,4 +453,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/php/how-to/customize-runtime.mdx b/apps/docs/content/php/how-to/customize-runtime.mdx index 02dc1595d..72114f78e 100644 --- a/apps/docs/content/php/how-to/customize-runtime.mdx +++ b/apps/docs/content/php/how-to/customize-runtime.mdx @@ -13,9 +13,9 @@ The default PHP runtime environment contains: - Git and Composer :::note -To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yml/specification#os--1) attribute. +To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yaml/specification#os--1) attribute. -Additional packages and tools can be installed using [run.prepareCommands](/zerops-yml/specification#preparecommands--1). +Additional packages and tools can be installed using [run.prepareCommands](/zerops-yaml/specification#preparecommands--1). ::: ## Runtime Flow @@ -33,7 +33,7 @@ When the first deploy with a defined `prepareCommands` attribute is triggered, Z 1. Create a prepare runtime container 2. Optionally: [copy selected folders or files from your build container](/php/how-to/build-pipeline#copy-folders-or-files-from-your-build-container) -3. Run the [run.prepareCommands](/zerops-yml/specification#preparecommands--1) commands in the defined order +3. Run the [run.prepareCommands](/zerops-yaml/specification#preparecommands--1) commands in the defined order ## Command exit code @@ -63,11 +63,11 @@ When the custom runtime cache is used, Zerops doesn't create a prepare runtime c ### Overwrite php.ini files -You can override PHP configuration directives by setting environment variables in your `zerops.yml` file. +You can override PHP configuration directives by setting environment variables in your `zerops.yaml` file. Here's an example of how to adjust PHP's `post_max_size` directive: -```yml +```yaml zerops: # define hostname of your service - setup: app diff --git a/apps/docs/content/php/how-to/customize-web-server.mdx b/apps/docs/content/php/how-to/customize-web-server.mdx index 1c1242851..90907ea6c 100644 --- a/apps/docs/content/php/how-to/customize-web-server.mdx +++ b/apps/docs/content/php/how-to/customize-web-server.mdx @@ -45,7 +45,7 @@ server { The configuration contains 2 variables: -- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yml`. If the attribute is not specified, the default value `/var/www` is used. +- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yaml`. If the attribute is not specified, the default value `/var/www` is used. - **`{{.PhpSocket}}`** is replaced by a path to the PHP socket based on the PHP version. @@ -53,11 +53,11 @@ The configuration contains 2 variables: Follow these steps to customize the Nginx configuration in PHP+Nginx service: -1. Create a **.tmpl** file with the Nginx configuration in your repository. +1. Create a **.tmpl** file with the Apache configuration in your repository. 2. Optionally use following variables: -- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yml`. If the attribute is not specified, the default value `/var/www` is used. +- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yaml`. If the attribute is not specified, the default value `/var/www` is used. Example: @@ -73,7 +73,7 @@ Example: fastcgi_pass unix:{{.PhpSocket}}; ``` -- **`{{.Environment.ENV_NAME}}`** is replaced by the [env variable](/php/how-to/env-variables) value. The env variable must be either defined in [run.envVariables](/php/how-to/build-pipeline#envvariables-1) in `zerops.yml` or set as a [secret](/php/how-to/env-variables#set-secret-env-variables-in-zerops-gui) or [generated](/php/how-to/env-variables#generated-env-variables) env variable in Zerops GUI. +- **`{{.Environment.ENV_NAME}}`** is replaced by the [env variable](/php/how-to/env-variables) value. The env variable must be either defined in [run.envVariables](/php/how-to/build-pipeline#envvariables-1) in `zerops.yaml` or set as a [secret](/php/how-to/env-variables#set-secret-env-variables-in-zerops-gui) or [generated](/php/how-to/env-variables#generated-env-variables) env variable in Zerops GUI. :::caution Use the **.tmpl** file extension to make Zerops interpret the file as a template. Zerops will replace the supported variables listed above. @@ -82,12 +82,12 @@ Use the **.tmpl** file extension to make Zerops interpret the file as a template 3. Check that your Nginx configuration is consistent with Zerops requirements: - Do not use IP addresses in the `listen` directive -- If you use other ports than `:80` in the `listen` directive, add them to the `run.ports` in your `zerops.yml` as well. +- If you use other ports than `:80` in the `listen` directive, add them to the `run.ports` in your `zerops.yaml` as well. - Do not use the port **:443**. All the incoming `https://` traffic is terminated on the Zerops internal balancer where the SSL certificate is installed and the request is forwarded to your PHP+Nginx service as a **http://** on the port **:80**. -4. Add the `siteConfigPath` to the run section of your `zerops.yml` +4. Add the `siteConfigPath` to the run section of your `zerops.yaml` -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -146,7 +146,7 @@ The default PHP+Apache service has following Apache configuration: The configuration contains 2 variables: -- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yml`. If the attribute is not specified, the default value `/var/www` is used. +- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yaml`. If the attribute is not specified, the default value `/var/www` is used. - **`{{.PhpSocket}}`** is replaced by a path to the PHP socket based on the PHP version. @@ -158,7 +158,7 @@ Follow these steps to customize the Apache configuration in PHP+Apache service: 2. Optionally use following variables: -- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yml`. If the attribute is not specified, the default value `/var/www` is used. +- **`{{.DocumentRoot}}`** is replaced by the `run.documentRoot` attribute from the `zerops.yaml`. If the attribute is not specified, the default value `/var/www` is used. Example: @@ -176,7 +176,7 @@ Example: ``` -- **`{{.Environment.ENV_NAME}}`** is replaced by the [env variable](/php/how-to/env-variables) value. The env variable must be either defined in [run.envVariables](<(/php/how-to/build-pipeline#envvariables-1)>) in `zerops.yml` or set as a [secret](/php/how-to/env-variables#set-secret-env-variables-in-zerops-gui) or [generated](/php/how-to/env-variables#generated-env-variables) env variable in Zerops GUI. +- **`{{.Environment.ENV_NAME}}`** is replaced by the [env variable](/php/how-to/env-variables) value. The env variable must be either defined in [run.envVariables](<(/php/how-to/build-pipeline#envvariables-1)>) in `zerops.yaml` or set as a [secret](/php/how-to/env-variables#set-secret-env-variables-in-zerops-gui) or [generated](/php/how-to/env-variables#generated-env-variables) env variable in Zerops GUI. :::caution Use the **.tmpl** file extension to make Zerops interpret the file as a template. Zerops will replace the supported variables listed above. @@ -185,12 +185,12 @@ Use the **.tmpl** file extension to make Zerops interpret the file as a template 3. Check that your Apache configuration is consistent with Zerops requirements: - Do not use IP addresses in the `` directive -- If you use other ports than `:80` in the `` directive, add them to the `run.ports` in your `zerops.yml` as well. +- If you use other ports than `:80` in the `` directive, add them to the `run.ports` in your `zerops.yaml` as well. Do not use the port **:443**. All the incoming `https://` traffic is terminated on the Zerops internal balancer where the SSL certificate is installed and the request is forwarded to your PHP+Apache service as a **http://** on the port **:80**. -4. Add the `siteConfigPath` to the run section of your `zerops.yml`. +4. Add the `siteConfigPath` to the run section of your `zerops.yaml`. -```yml +```yaml zerops: # define hostname of your service - setup: app diff --git a/apps/docs/content/php/how-to/deploy-process.mdx b/apps/docs/content/php/how-to/deploy-process.mdx index b14b317b6..eae4905e5 100644 --- a/apps/docs/content/php/how-to/deploy-process.mdx +++ b/apps/docs/content/php/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/php/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/php/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready as soon as it starts, configure a [readiness check](/php/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready as soon as it starts, configure a [readiness check](/php/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/php/how-to/env-variables.mdx b/apps/docs/content/php/how-to/env-variables.mdx index ffe2288e4..5b56f3089 100644 --- a/apps/docs/content/php/how-to/env-variables.mdx +++ b/apps/docs/content/php/how-to/env-variables.mdx @@ -23,12 +23,12 @@ There are 3 different sets of env variables in Zerops: basic build - zerops.yml + zerops.yaml basic runtime - zerops.yml + zerops.yaml secret @@ -41,13 +41,13 @@ There are 3 different sets of env variables in Zerops: Use the [secret env variables](/php/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/php/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/php/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

- - - Resources Type - Minimum resource - Maximum resource - - - - - CPU cores - 1 - 5 - - - RAM - 0.25 GB - 32 GB - - - Disk - 1 GB - 100 GB - - - - + PHP service always starts with the minimal resources. @@ -207,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/php/how-to/shared-storage.mdx b/apps/docs/content/php/how-to/shared-storage.mdx index d34ff8d9c..b90a0f835 100644 --- a/apps/docs/content/php/how-to/shared-storage.mdx +++ b/apps/docs/content/php/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new PHP service via the comman Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/php/how-to/create#create-a-project-description-file) how to define the PHP service using the description.yml. +[Read the basics](/php/how-to/create#create-a-project-description-file) how to define the PHP service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a PHP service and a shared storage -Follow the article [How to create a project based on the description.yml](/php/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/php/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/php/how-to/trigger-pipeline.mdx b/apps/docs/content/php/how-to/trigger-pipeline.mdx index 16013e1f8..268334dea 100644 --- a/apps/docs/content/php/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/php/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/php/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/php/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/php/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/php/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/php/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/php/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/php/how-to/upgrade.mdx b/apps/docs/content/php/how-to/upgrade.mdx index 6878f091d..90c77a3d5 100644 --- a/apps/docs/content/php/how-to/upgrade.mdx +++ b/apps/docs/content/php/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the PHP version description: Learn how to upgrade your php service's version --- -You can upgrade or downgrade your PHP service to a different major PHP version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/php/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required PHP version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current PHP version for your runtime. +You can upgrade or downgrade your PHP service to a different major PHP version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/php/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required PHP version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current PHP version for your runtime. -If you want to build your application with a different major PHP version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major PHP version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/php/overview.mdx b/apps/docs/content/php/overview.mdx index 4c7f86d5b..c9bfc1f45 100644 --- a/apps/docs/content/php/overview.mdx +++ b/apps/docs/content/php/overview.mdx @@ -23,9 +23,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-php-hello-world/blob/main/import-project/description.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-php-hello-world/blob/main/import-project/description.yaml)): -```yml +```yaml project: name: my-first-project services: @@ -96,12 +96,12 @@ Do you have any questions? Check the step-by-step tutorial, browse the documenta }, { type: 'link', - href: '/php/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'zerops.yml', + href: '/php/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -152,7 +152,7 @@ Have you build something that others might find useful? Don't hesitate to share + + + Parameter + Internal Connection + Direct IP Access (TLS) + + + + + Hostname/IP + Service hostname + Public IP address + + + Port + 5432 + 6432 + + + User + Identical to the service hostname + Same as internal + + + Password + Randomly generated during service creation + Same as internal + + + Port env variable + `port` + `portTls` + + + Connection string env variable + `connectionString` + `connectionTlsString` + + + + +:::warning +Zerops creates a system user named `zps` with full privileges for maintenance purposes. Do not delete, change the password, or remove privileges from this user, as it will disrupt Zerops' ability to maintain the database cluster. +::: :::info -Zerops creates a second DB user: `zps` for maintenance reasons with full privileges. Do not delete, change the password or remove privileges from this user, it will disrupt Zerops ability to maintain the database cluster. +For more information about default PostgreSQL setup, users, and databases, see [Manage PostgreSQL Users and Databases](/postgresql/how-to/manage). ::: -## Copy access details from Zerops GUI - -You will find the PostgreSQL access details under the **Access details** button in the project dashboard page. - -{/*TODO screenshot (Access detail popover)*/} +## Connect from Services in the Same Project -The same information is available in the service detail page in the left menu under the **Peek access details** button. +All services within a Zerops project share a dedicated private network. There are two ways to implement connections between services in the same project: -### PostgreSQL access parameters: +### Method 1: Direct Connection Parameters -| Parameter | Description | -| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| **Hostname** | The service hostname specified when the PostgreSQL service was created. | -| **Port** | **5432**
This port is fixed for all PostgreSQL services and cannot be customized. | -| **User** | Zerops creates a database user automatically when the service is created. The user name is always identical to the service hostname. | -| **Password** | Zerops sets a random password when the service is created. | -| **Connection string** | The connection string for PostgreSQL service is:
`postgresql://${user}:${password}@{hostname}:5432` | - -## Connect to PostgreSQL from runtime services of the same project - -Projects in Zerops represent a group of one or more services. Services can be of different types (runtime services, databases, message brokers, object storage, etc.). All services of the same project share a **dedicated private network**. To connect to a service within the same project, just use the service hostname and its internal port. - -{/*TODO image (project example diagram)*/} - -#### Example - -To connect to PostgreSQL `database1` service, set +You can directly use the connection parameters from Access Details: ``` host = database1 +port = 5432 user = database1 -password = ********** +password = ********** (find under Access Details) ``` -You will find the password under the [**Access details**](#copy-access-details-from-zerops-gui) button in Zerops GUI. - -:::caution -Do not use SSL/TLS protocols when connecting to PostgreSQL from other runtime services in the same project. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the project private network. Due to security reasons Zerops doesn't allow exposing PostgreSQL service to the internet. -::: - -## Use PostgreSQL environment variables - -Zerops creates default environment variables for each PostgreSQL service to help you with connection from runtime services in the same project. To avoid the need to copy database access parameters manually, use environment variables in your [runtime service]. - -### Prefix the environment variable key - -All services of the same project can reference environment variables from other services. To use an environment variable from one service in another service in the same project, you must prefix the environment variable key with the service hostname and underscore. - -#### Example - -To access the `connectionString` env variable of the `postgresql1` service, use `postgresql1_connectionString` as the env variable key. -To access the `password` env variable of the `postgresql2` service, use `postgresql2_password` as the env variable key. - -### PostgreSQL environment variables - -List of service environment variables is available in Zerops GUI. Go to a PostgreSQL service detail and choose **Environment variables** in the left menu. +### Method 2: Environment Variables (Recommended) -{/*TODO screenshot (Service env variables table page in the PostgreSQL detail)*/} +For better maintainability, Zerops creates environment variables for each PostgreSQL service that you can use in your application configuration. List of service environment variables is available in Zerops GUI. Go to a PostgreSQL service detail and choose **Environment variables**. -Zerops creates following environment variables when the PostgreSQL service is created: +To use variables from one service in another, prefix the variable name with the service hostname and underscore - to access the `connectionString` variable of `postgresql1`, use `postgresql1_connectionString`. -| Variable | Description | -| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Hostname** | The service hostname specified when the PostgreSQL service was created. | -| **Port** | **5432**
This port is fixed for all PostgreSQL services and cannot be customized. | -| **projectId** | ID of the project. Generated by Zerops. | -| **serviceId** | ID of the PostgreSQL service. Generated by Zerops. | -| **Connection string** | The connection string for PostgreSQL service is:
`postgresql://${user}:${password}@{hostname}:5432`

Connection string contains [references](/postgresql/how-to/connect#postgresql-access-parameters) to `user` and `password` variables. Each time the `user` or `password` variable is updated, the `connectionString` variable is automatically updated as well. | -| **User** | Zerops creates a database user automatically when the service is created. The user name is always identical to the service hostname. | -| **Password** | Zerops sets a random password when the service is created. | +For more details on how to use environment variables, and instructions for adding your own custom variables, see the [Environment Variables](/features/env-variables) documentation. -:::caution -When you change the value of the password env variable, only the env variable is updated, not the actual password of the PostgreSQL user. You have to update the password of the database user manually. - -When you change the password of the default PostgreSQL user in the database, the new password is not synchronised to the password env variable. You have to update the `password` env variable manually. -::: -:::caution -The official PostgreSQL documentation states that both `postgresql://` and `postgres://` URIs are valid. In Zerops, we chose to generate the connection string with the widely used `postgresql://` schema. -Some softwares however require the connection string to start with the shorter `postgres://` version only, which might cause errors. To fix that, create your own environment variable with the correct URI, e.g. when your PostgreSQL service is called `db` - `postgres://${db_user}:${db_password}@${db_hostname}:${db_port}`. +:::caution Important notes +- When changing passwords, update both the database user password and the environment variable separately - they don't automatically synchronize. +- While both `postgresql://` and `postgres://` URI formats are valid, Zerops uses the `postgresql://` format. If your software requires `postgres://`, create a custom environment variable with this format. +- Do not use SSL/TLS protocols for internal connections. Security is assured by the project's private network. ::: -You can create own custom [environment variables](/features/env-variables) for the PostgreSQL service in Zerops GUI and use them in the same way as the default variables. +## Connect Remotely -## Connect to PostgreSQL in Zerops remotely - -:::caution -Due to security reasons Zerops doesn't allow exposing PostgreSQL service directly to the internet. -::: +Zerops offers two methods for connecting to your PostgreSQL database from outside the Zerops environment: -### Start VPN connection +### Method 1: Connect via Zerops VPN -You can securely connect to PostgreSQL from your local workspace via Zerops VPN. Zerops VPN client is included into zCLI, the Zerops command-line tool. To start a VPN connection to the selected Zerops project, follow these steps: +You can securely connect to PostgreSQL from your local workstation via Zerops VPN: -1. [Install & setup zCLI](/references/cli) +1. [Install & set up zCLI](/references/cli) 2. [Start the Zerops VPN](/references/vpn#start-vpn) +3. Use the connection details from Access Details in the PostgreSQL service detail in Zerops GUI +4. When finished, [stop the Zerops VPN](/references/vpn#stop-vpn) -### Access PostgreSQL through VPN - -Once the VPN session is established, you have the secured connection to the project's private network in Zerops. You can access all project services locally by using their hostname. The only difference is that no [environment variables](#use-postgresql-environment-variables) are available when connected through VPN. To connect to PostgreSQL in Zerops you have to copy the [access details](#copy-access-details-from-zerops-gui) manually from Zerops GUI. - -:::caution -Do not use SSL/TLS protocols when connecting to PostgreSQL over VPN. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the VPN. +:::warning Important notes +* Do not use SSL/TLS protocols when connecting over VPN. Security is provided by the VPN tunnel. +* If your connection over VPN doesn't work, try adding `.zerops` suffix to the service hostname (e.g., `database1.zerops`). For additional help, check the [VPN troubleshooting page](/references/vpn/troubleshooting). ::: -### Stop VPN connection +### Method 2: Connect via Direct IP Access + +Direct IP Access uses [pgBouncer](https://www.pgbouncer.org/) for connection pooling and TLS termination. -[Stop the Zerops VPN](/references/vpn#stop-vpn) in zCLI. +Internally, port `5432` is available without SSL. Externally, connections are secured with TLS through pgBouncer (port `6432`) before being routed to your PostgreSQL service. -### Connect to PostgreSQL from another Zerops project +#### Enable external access -All services of the same project share a **dedicated private network**. You can use the service hostname to connect from one service to another within the same project. +1. Navigate to your PostgreSQL service in the Zerops GUI and choose the **Public Access through IP Addresses** section +2. Choose either IPv6 (available by default) or IPv4 (requires the [unique IPv4](/features/access#dedicated-ipv4-address-330-days) add-on) +3. Open one or more ports and point them to your PostgreSQL service (the system will direct them through pgBouncer) + - Choose any port from 10-65435 (except 80 and 443) + - Select destination service and internal port + - Each public port can be mapped to any internal service port + - Multiple public ports can point to the same internal port if needed + - Port configurations can be set independently for IPv4 and IPv6 +4. Optionally enable firewall protection for additional security +5. Click the **Publish X IP access change(s)** button to apply your settings -Different Zerops projects have no special connection. They can communicate with each other only via the internet. If you need to connect to a PostgreSQL service in a Zerops project from a runtime service in another project, you need to use the [Zerops VPN](#access-postgresql-through-vpn). Due to security reasons Zerops doesn't allow exposing PostgreSQL service directly to the internet. +For database management tools and how to manage users and databases, see [Manage PostgreSQL Users and Databases](/postgresql/how-to/manage). \ No newline at end of file diff --git a/apps/docs/content/postgresql/how-to/create.mdx b/apps/docs/content/postgresql/how-to/create.mdx index 595c6725f..efe641ec4 100644 --- a/apps/docs/content/postgresql/how-to/create.mdx +++ b/apps/docs/content/postgresql/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; ## Create PostgreSQL using Zerops GUI @@ -106,11 +107,11 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto-scaling has the following default configuration: -|   | Minimum resource | Maximum resource | -| ------------- | ---------------- | ---------------- | -| **CPU cores** | 1 | 5 | -| **RAM** | 0.25 GB | 8 GB | -| **Disk** | 1 GB | 2.5 GB | + For most cases, the default parameters will work without issues. If you need to limit the cost of the PostgreSQL service, lower the maximal resources. Zerops will never scale above the selected maximums. @@ -142,9 +143,9 @@ Zerops uses a YAML format file to describe the project infrastructure. #### Basic example -Create a directory `my-project`. Create a `description.yml` file inside the directory with the following content: +Create a directory `my-project`. Create a `description.yaml` file inside the directory with the following content: -```yml +```yaml # Basic project data project: # project name @@ -163,9 +164,9 @@ The YAML file describes your future project infrastructure. The project will con #### Full example -Create a directory `my-project`. Create a `description.yml` file inside the directory with the following content: +Create a directory `my-project`. Create a `description.yaml` file inside the directory with the following content: -```yml +```yaml # Basic project data project: # project name @@ -210,7 +211,7 @@ The hostname of the first service will be set to `postgresql1`. The [high availa The hostname of the second service will be set to `postgresql2`. The [single container](#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/scale) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -242,7 +243,7 @@ The `project:` section is required. Only one project can be defined. -At least one service in the `services:` section is required. You can create a project with multiple services. The example above contains only PostgreSQL services but you can create a `description.yml` with [different types] of services. +At least one service in the `services:` section is required. You can create a project with multiple services. The example above contains only PostgreSQL services but you can create a `description.yaml` with [different types] of services. @@ -277,7 +278,7 @@ At least one service in the `services:` section is required. You can create a pr @@ -363,9 +364,9 @@ At least one service in the `services:` section is required. You can create a pr The PostgreSQL service **hostname** and **mode** are fixed after the service is created. They can't be changed later. ::: -### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -378,11 +379,11 @@ Flags: --workingDie string Sets a custom working directory. The default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -The maximum size of the `description.yml` file is 100 kB. +The maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -398,7 +399,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```bash # array of project services @@ -414,9 +415,9 @@ services: The YAML file describes the list of one or more services that you want to add to your existing project. In the example above, one PostgreSQL service in the [single container mode](#single-container) with default [auto scaling](/postgresql/how-to/scale) configuration will be added to your project. The hostname of the new service will be set to `postgresql1`. -The content of the `services:` section of `import.yml` is identical to the [project description file](#create-a-project-description-file). The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the [project description file](#create-a-project-description-file). The `import.yaml` never contains the `project:` section because the project already exists. -When your `import.yml` is ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When your `import.yaml` is ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -430,4 +431,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -The maximum size of the `import.yml` file is 100 kB. +The maximum size of the `import.yaml` file is 100 kB. diff --git a/apps/docs/content/postgresql/how-to/export-import-data.mdx b/apps/docs/content/postgresql/how-to/export-import-data.mdx index 6986f27f0..f8ddd71ff 100644 --- a/apps/docs/content/postgresql/how-to/export-import-data.mdx +++ b/apps/docs/content/postgresql/how-to/export-import-data.mdx @@ -3,25 +3,18 @@ title: Export or import PostgreSQL data description: Learn how to export or import postgresql data on Zerops. --- -## Use Adminer to export or import data +## Use Adminer or phpMyAdmin to export or import data +* [Adminer ↗](https://www.adminer.org) - an open source full-featured database management tool written in PHP +* [phpMyAdmin ↗](https://www.phpmyadmin.net) - a free software tool written in PHP, intended to handle the administration of PostgreSQL over the Web -[Adminer ↗](https://www.adminer.org) is an open source full-featured database management tool written in PHP. - -1. [Install Adminer to Zerops](/postgresql/how-to/manage#how-to-install-adminer-to-zerops) -2. Use Adminer standard export or import functions - -## Use phpMyAdmin to export or import data - -[phpMyAdmin ↗](https://www.phpmyadmin.net) is a free software tool written in PHP, intended to handle the administration of PostgreSQL over the Web. - -1. [Install phpMyAdmin to Zerops](/postgresql/how-to/manage#how-to-install-phpmyadmin-to-zerops) -2. Use phpMyAdmin standard export or import functions +1. [Install the tools to Zerops](/postgresql/how-to/manage#installing-management-tools) +2. Use their standard export or import functions ## Use a database management tool on your workstation to export or import data Do you already use a database management tool that supports PostgreSQL on your workstation? Connect it securely to PostgreSQL from your local workspace via Zerops VPN. -Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read [how to connect to PostgreSQL remotely](/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely). +Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read [how to connect to PostgreSQL remotely](/postgresql/how-to/connect#connect-remotely). :::caution Do not use SSL/TLS protocols when connecting to PostgreSQL over VPN. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the VPN. ::: @@ -32,9 +25,9 @@ Once the connection to PostgreSQL is established, use the standard export or imp If you are using the [psql ↗](https://www.postgresql.org/docs/current/app-psql.html) command-line client to manage your PostgreSQL on your local workspace, you can connect it securely to PostgreSQL via Zerops VPN. -Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read [how to connect to PostgreSQL remotely](/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely). +Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read [how to connect to PostgreSQL remotely](/postgresql/how-to/connect#connect-remotely). -Once the VPN session is established, you have the secured connection to the project's private network in Zerops. You can access all project services locally by using their hostname. The only difference is that no [environment variables](/postgresql/how-to/connect#use-postgresql-environment-variables) are available when connected through VPN. To connect to PostgreSQL in Zerops you have to copy the [access details](/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely) manually from Zerops GUI. +Once the VPN session is established, you have the secured connection to the project's private network in Zerops. You can access all project services locally by using their hostname. The only difference is that no [environment variables](/postgresql/how-to/connect#method-2-environment-variables-recommended) are available when connected through VPN. To connect to PostgreSQL in Zerops you have to copy the [access details](/postgresql/how-to/connect#connection-details) manually from Zerops GUI. Use [psql ↗](https://www.postgresql.org/docs/current/app-psql.html) command to connect to PostgreSQL in Zerops: diff --git a/apps/docs/content/postgresql/how-to/manage.mdx b/apps/docs/content/postgresql/how-to/manage.mdx index b8ef2c060..c673ecbc7 100644 --- a/apps/docs/content/postgresql/how-to/manage.mdx +++ b/apps/docs/content/postgresql/how-to/manage.mdx @@ -1,148 +1,181 @@ --- -title: Manage PostgreSQL users and databases in Zerops -description: Learn how you can manage postgresql users and databases on Zerops. +title: Manage PostgreSQL Users, Databases and Plugins in Zerops +description: Learn how to manage PostgreSQL users, databases, plugins, and use database administration tools in Zerops. --- -## Default database and user +import { Dropdown, DropdownItem } from '/src/components/Dropdown'; +import TabbedCodeBlocks from '/src/components/TabbedCodeBlock'; -Zerops creates a default database and a default user automatically when a new PostgreSQL service is [created](/postgresql/how-to/create). +This guide covers how to manage your PostgreSQL databases in Zerops, including default setup, database management tools, plugins, and best practices. -#### Database +## Default Database and User -The default database name is identical to the service hostname. The default encoding is set to `utf8mb4`. +Zerops creates a default database and user automatically when a new PostgreSQL service is [created](/postgresql/how-to/create). -#### DB user +### Database -Default user name is identical to the service hostname. Default user password is generated randomly. You will find the password in [Zerops GUI](/postgresql/how-to/connect#copy-access-details-from-zerops-gui) or you can use the [environment variable](/postgresql/how-to/connect#use-postgresql-environment-variables). +- **Name**: Identical to the service hostname +- **Encoding**: `utf8mb4` -:::info -Zerops creates a second DB user: `zps` for maintenance reasons with full privileges. Do not delete, change the password or remove privileges from this user, it will disrupt Zerops ability to maintain the database cluster. -::: - -## How to install Adminer to Zerops - -[Adminer ↗](https://www.adminer.org) is a open source full-featured database management tool written in PHP. - -### Single-click installation - -To install Adminer into your project, open your project in Zerops GUI and select **import services** in the left menu. - -Copy the following yaml file into the text area and start the import: - -```yml -services: - - # Service will be accessible through zCLI VPN under: http://adminer - hostname: adminer - # Type and version of service used. - type: php-apache@8.0+2.4 - # Whether the service will be run on one or multiple containers. - # Since this is a utility service, using a single container is fine. - minContainers: 1 - maxContainers: 1 - # Folder name used as the root of the publicly accessible web server content. - documentRoot: public - # Link to Zerops repository that contains Adminer code with Zerops build and deploy instructions. - buildFromGit: https://github.com/zeropsio/recipe-adminer@main -``` - -When the import is finished, Adminer will be running as a PHP service in your project. - -## How to access Adminer - -### Use Zerops VPN +### DB User -By default Adminer service is private and is accessible from your local workstation over VPN. +- **Username**: Identical to the service hostname +- **Password**: Generated randomly -You can securely connect to PostgreSQL from your local workspace via Zerops VPN. Zerops VPN client is included into zCLI, the Zerops command-line tool. To start a VPN connection to the selected Zerops project, follow these steps: - -1. [Install & setup zCLI](/references/cli) -2. [Start the Zerops VPN](/references/vpn) -3. Type `http://adminer` into your browser - -:::caution -Do not use https when connecting to Adminer via VPN. +:::info +For connection methods and environment variables, see the [Connect to PostgreSQL in Zerops](/postgresql/how-to/connect) page. ::: -### Enable public access - -You can enable the public access to the Adminer service via the [Zerops subdomain]. +:::caution Important notes +- When changing passwords, update both the database user password and the environment variable separately - they don't automatically synchronize. +- While both `postgresql://` and `postgres://` URI formats are valid, Zerops uses the `postgresql://` format. If your software requires `postgres://`, create a custom environment variable with this format. +- Do not use SSL/TLS protocols for internal connections. Security is assured by the project's private network. +::: -Or you can configure the [Public routing] on the Adminer service to make it accessible on your own domain. +## Database Management Tools -## How to install phpMyAdmin to Zerops +You can use any PostgreSQL management tool of your choice to administer your databases in Zerops. For convenience, Zerops provides ready-to-use recipes for two popular web-based database management tools: -[phpMyAdmin ↗](https://www.phpmyadmin.net) is a free software tool written in PHP, intended to handle the administration of PostgreSQL over the Web. +* [AdminerEvo](https://github.com/adminerevo/adminerevo) - developed by the AdminerEvo community and is a continuation of the [Adminer](https://www.adminer.org) project by Jakub Vrána +* [phpMyAdmin](https://www.phpmyadmin.net) - a popular free database administration tool that works with both MySQL and PostgreSQL databases -### Single-click installation +### Installing Management Tools -To install phpMyAdmin into your project, open your project in Zerops GUI and select **import services** in the left menu. +You can install these tools with a simple one-click import in Zerops: -Copy the following yaml file into the text area and start the import: +1. In Zerops GUI, open your project and select **Import services** from the left menu +2. Copy and paste one of the following YAML configurations: -```yml -services: - - # Service will be accessible through zCLI VPN under: http://phpmyadmin - hostname: phpmyadmin - # Type and version of service used. + -## How to access phpMyAdmin +### Accessing Management Tools -### Use Zerops VPN +After installation, you can access these tools via VPN: -By default phpMyAdmin service is private and is accessible from your local workstation over VPN. +1. [Start the Zerops VPN](/references/vpn) +2. Type `http://adminerevo` or `http://phpmyadmin` in your browser -You can securely connect to PostgreSQL from your local workspace via Zerops VPN. Zerops VPN client is included into zCLI, the Zerops command-line tool. To start a VPN connection to the selected Zerops project, follow these steps: - -1. [Install & setup zCLI](/references/cli) -2. [Start the Zerops VPN](/references/vpn) -3. Type `http://phpmyadmin` into your browser +:::tip +Try `http://adminerevo.zerops` or `http://phpmyadmin.zerops` if you encounter any connection issues. +::: :::caution -Do not use https when connecting to phpMyAdmin via VPN. +Do not use https when connecting to management tools via VPN. ::: -### Enable public access +## Database Tools on Your Workstation -You can enable the public access to the phpMyAdmin service via the [Zerops subdomain]. +You can use various database management tools from your local workstation to connect to your PostgreSQL database in Zerops: -Or you can configure the [Public routing] on the phpMyAdmin service to make it accessible on your own domain. +1. **Establish a secure tunnel** using the [Zerops VPN](/references/vpn) to create an encrypted connection to your Zerops project +2. **Obtain the [connection details](/postgresql/how-to/connect#connection-details)** from Zerops GUI + - Environment variables are not available through VPN connections +3. Connect with your **preferred database tool** + - Do not use SSL/TLS (security is provided by the VPN) + - **Desktop Database Tools** - popular GUI tools like pgAdmin, DBeaver, DataGrip, or any other PostgreSQL-compatible client will work with Zerops + - **Command Line with psql** - connect using the standard PostgreSQL command-line client with the credential obtained above: + ```sh + psql -h [hostname] -U [user] -d [database_name] + ``` -## How to use a database management tool on your workstation +:::tip + Try `{hostname}.zerops` instead of just `{hostname}` if you encounter any connection issues. +::: -Do you already use a database management tool that supports PostgreSQL on your workstation? Connect it securely to PostgreSQL from your local workspace via Zerops VPN. +## How to install and manage PostgreSQL plugins -Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read [how to connect to PostgreSQL remotely](/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely). +### Viewing available plugins +You can list all available PostgreSQL plugins by running the following query *(superuser privileges not required)*: -:::caution -Do not use SSL/TLS protocols when connecting to PostgreSQL over VPN. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the VPN. -::: +```sql +SELECT * FROM pg_available_extensions ORDER BY name; +``` + +### Installing plugins (requires superuser) -## How to use psql CLI on your workstation +1. **Connect with superuser credentials**: + - Use the `superUser` (user `postgres`) and `superUserPassword` environment variables from your PostgreSQL service -If you use the [psql ↗](https://www.postgresql.org/docs/current/app-psql.html) command-line client to manage your PostgreSQL on your local workspace, you can connect it securely to PostgreSQL via Zerops VPN. +2. **Switch to your service database**: + When logging in as the superuser, you're initially in the `postgres` database, not your service database. -Zerops VPN client is included into zCLI, the Zerops command-line tool. To start the VPN connection, read [how to connect to PostgreSQL remotely](/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely). +3. **Install required extensions**: + ```sql + CREATE EXTENSION pg_stat_statements; + CREATE EXTENSION vector; + CREATE EXTENSION postgis; + ``` -Once the VPN session is established, you have the secured connection to the project's private network in Zerops. You can access all project services locally by using their hostname. The only difference is that no [environment variables](/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely) are available when connected through VPN. To connect to PostgreSQL in Zerops you have to copy the [access details](/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely) manually from Zerops GUI. +:::warning +Currently, it is not possible to add new plugins that are not already listed in `pg_available_extensions`. +::: -Use `psql` command to connect to PostgreSQL in Zerops: +When working with text search functionality, you'll need to reference the correct `stop`, `dict`, and `affix` files when creating dictionaries in your database. These files are essential for proper text search configuration. -```sh -psql -h [hostname] -U [user] -p [password] -d [database_name] -``` +Zerops PostgreSQL includes the following dictionary files: -:::caution -Do not use SSL/TLS protocols when connecting to PostgreSQL over VPN. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the VPN. -::: + + +**Stop word files** - used to remove common words that don't add significant meaning: +``` +czech.stop +danish.stop +dutch.stop +english.stop +finnish.stop +french.stop +german.stop +hungarian.stop +italian.stop +nepali.stop +norwegian.stop +polish.stop +portuguese.stop +russian.stop +slovak.stop +spanish.stop +swedish.stop +turkish.stop +``` +**Dictionary and affix files** - used for stemming and word normalization: +``` +cs_CZ.affix +cs_CZ.dict +en_US.affix +en_US.dict +pl_PL.affix +pl_PL.dict +sk_SK.affix +sk_SK.dict +``` +**Special rules file:** +``` +unaccent.rules +``` + + +For more information on text search dictionaries, refer to the [PostgreSQL documentation](https://www.postgresql.org/docs/16/textsearch-dictionaries.html). \ No newline at end of file diff --git a/apps/docs/content/postgresql/how-to/scale.mdx b/apps/docs/content/postgresql/how-to/scale.mdx index 53d3325ef..1c907af5e 100644 --- a/apps/docs/content/postgresql/how-to/scale.mdx +++ b/apps/docs/content/postgresql/how-to/scale.mdx @@ -4,6 +4,7 @@ description: Get to know how Zerops scales your postgresql service. --- import Image from '/src/components/Image'; +import ResourceTable from '/src/components/ResourceTable'; Zerops performs an automated scaling of hardware resources required to run your database based on its usage. If the current use of your database does not require as much performance or disk space the auto scaling reduces the resources and thus reduces the costs. If your database is under heavy load or needs to store more data, then auto scaling increases the resources for the database to make sure it runs smoothly. @@ -38,11 +39,11 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: -|   | Minimum resource | Maximum resource | -| ------------- | ---------------- | ---------------- | -| **CPU cores** | 1 | 5 | -| **RAM** | 0.25 GB | 8 GB | -| **Disk** | 1 GB | 2.5 GB | + For most cases, the default parameters will work without issues. If you need to limit the cost of the PostgreSQL service, lower the maximal resources. Zerops will never scale above the selected maximums. @@ -106,7 +107,7 @@ Zerops monitors CPU, RAM and Disk usage in all running containers each 10 second The **scale up threshold** is derived from following **minimum free resources**: - 0.1 CPU core -- 0.25 GB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) +- 0.125 GB RAM (You can [fine tune](#fine-tune-the-auto-scaling) this setting) - 0.5 GB disk If the minimum free CPU, RAM or disk usage of a container is lower than the defined scale up threshold, Zerops scales the container up. @@ -116,7 +117,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the database is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/postgresql/overview.mdx b/apps/docs/content/postgresql/overview.mdx index 8fd11b5d7..644c111a3 100644 --- a/apps/docs/content/postgresql/overview.mdx +++ b/apps/docs/content/postgresql/overview.mdx @@ -61,7 +61,7 @@ import LargeCard from '@site/src/components/LargeCard'; }, { type: 'link', - href: '/postgresql/how-to/connect#connect-to-postgresql-from-runtime-services-of-the-same-project', + href: '/postgresql/how-to/connect#connect-from-services-in-the-same-project', label: 'Connect from the same project', customProps: { icon: Icons['link'], @@ -69,7 +69,7 @@ import LargeCard from '@site/src/components/LargeCard'; }, { type: 'link', - href: '/postgresql/how-to/connect#connect-to-postgresql-in-zerops-remotely', + href: '/postgresql/how-to/connect#connect-remotely', label: 'Connect remotely', customProps: { icon: Icons['globe-europe'], @@ -113,7 +113,7 @@ Have you build something that others might find useful? Don't hesitate to share - sample answer - diff --git a/apps/docs/content/python/how-to/access.mdx b/apps/docs/content/python/how-to/access.mdx index 1f9f00286..e9c172ce7 100644 --- a/apps/docs/content/python/how-to/access.mdx +++ b/apps/docs/content/python/how-to/access.mdx @@ -55,7 +55,7 @@ Use the `ssh` command to connect to your service v ## Public access through zerops.io subdomain -By default, your Python service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain). +By default, your Python service is not publicly accessible. To test your application, enable the [public access through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain). ## Public access through your domain @@ -63,4 +63,4 @@ By default, your Python service is not publicly accessible. When your applicatio ## Public access from another Zerops project -All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/python/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zeropsapp-subdomain) or [through your domain](/features/access#public-access-through-your-domain). +All services of the same project share a dedicated private network. To connect to a service within the same project, just use the service hostname and its [internal port](/python/how-to/build-pipeline#ports). Different projects are not connected inside Zerops. To connect to a runtime service from another Zerops project, you need to use public access either [through zerops.io subdomain](/features/access#public-access-through-zerops-subdomain) or [through your domain](/features/access#public-access-through-your-domain). diff --git a/apps/docs/content/python/how-to/build-pipeline.mdx b/apps/docs/content/python/how-to/build-pipeline.mdx index f29a9539f..3d4ceb891 100644 --- a/apps/docs/content/python/how-to/build-pipeline.mdx +++ b/apps/docs/content/python/how-to/build-pipeline.mdx @@ -9,11 +9,11 @@ import UnorderedCodeList from 'docs/src/components/UnorderedCodeList'; Zerops provides a customizable build and runtime environment for your Python application. -## Add zerops.yml to your repository +## Add zerops.yaml to your repository -Start by adding `zerops.yml` file to the **root of your repository** and modify it to fit your application: +Start by adding `zerops.yaml` file to the **root of your repository** and modify it to fit your application: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -74,9 +74,9 @@ The top-level element is always `zerops`. ### Setup The first element `setup` contains the **hostname** of your service. A runtime service with the same hostname must exist in Zerops. -Zerops supports the definition of multiple runtime services in a single `zerops.yml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yml`: +Zerops supports the definition of multiple runtime services in a single `zerops.yaml`. This is useful when you use a monorepo. Just add multiple setup elements in your `zerops.yaml`: -```yml +```yaml zerops: # definition for app service - setup: app @@ -101,7 +101,7 @@ Following options are available for Python builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -118,12 +118,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the build environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -137,7 +137,7 @@ zerops: ... ``` -See the full list of supported [build base environments](/zerops-yml/base-list#runtime-services). +See the full list of supported [build base environments](/zerops-yaml/base-list#runtime-services). To customize your build environment use the [prepareCommands](/python/how-to/build-pipeline#preparecommands) attribute. @@ -182,7 +182,7 @@ The base build environment contains: To install additional packages or tools add one or more prepare commands: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -218,7 +218,7 @@ If any command fails, it returns an exit code other than 0 and the build is canc Use following syntax to run all commands in the same environment context. For example, if one command changes the current directory, the next command continues in that directory. When one command creates an environment variable, the next command can access it. -```yml +```yaml prepareCommands: - | apt update @@ -229,7 +229,7 @@ prepareCommands: When the following syntax is used, each command is triggered in a separate environment context. For example, each shell instance starts in the home directory again. When one command creates an environment variable, it won't be available for the next command. -```yml +```yaml prepareCommands: - apt update - apt install python3-pip # already installed for Python services @@ -239,7 +239,7 @@ prepareCommands: _REQUIRED._ Selects which files or folders will be deployed after the build has successfully finished. To filter out specific files or folders, use `.deployignore` file. -```yml +```yaml # REQUIRED. Select which files / folders to deploy after # the build has successfully finished deployFiles: @@ -248,7 +248,7 @@ deployFiles: Determines files or folders produced by your build, which should be deployed to your runtime service containers. -The path starts from the **root directory** of your project (the location of `zerops.yml`). You must enclose the name in quotes if the folder or the file name contains a space. +The path starts from the **root directory** of your project (the location of `zerops.yaml`). You must enclose the name in quotes if the folder or the file name contains a space. The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/assets/fonts` would result in `/var/www/src/assets/fonts`. @@ -256,20 +256,20 @@ The files/folders will be placed into `/var/www` folder in runtime, e.g. `./src/ Deploys a folder, and a file from the project root directory: -```yml +```yaml deployFiles: - app.py ``` Deploys the whole content of the build container: -```yml +```yaml deployFiles: . ``` Deploys a folder, and a file in a defined path: -```yml +```yaml deployFiles: - ./path/to/file.txt - ./path/to/dir/ @@ -281,19 +281,19 @@ Zerops supports the `~` character as a wildcard for one or more folders in the p Deploys all `file.txt` files that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/file.txt ``` Deploys all folders that are located in any path that begins with `/path/to/` -```yml +```yaml deployFiles: ./path/to/~/ ``` Deploys all folders that are located in any path that begins with `/path/` and ends with `/to/` -```yml +```yaml deployFiles: ./path/~/to/ ``` @@ -313,7 +313,7 @@ For consistency, it's recommended to configure both your `.gitignore` and `.depl Examples: -```yml title="zerops.yml" +```yaml title="zerops.yaml" zerops: - setup: app build: @@ -340,7 +340,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: _OPTIONAL._ Defines which files or folders will be cached for the next build. -```yml +```yaml # OPTIONAL. Which files / folders you want to cache for the next build. # Next builds will be faster when the cache is used. cache: file.txt @@ -358,7 +358,7 @@ _OPTIONAL._ Defines the environment variables for the build environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -389,7 +389,7 @@ Following options are available for Python builds: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -412,12 +412,12 @@ zerops:

:::info -You can change the base environment when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. ::: If you need to install more technologies to the runtime environment, set multiple values as a yaml array. For example: -```yml +```yaml zerops: # hostname of your service - setup: app @@ -437,7 +437,7 @@ zerops: ... ``` -See the full list of supported [run base environments](/zerops-yml/base-list). +See the full list of supported [run base environments](/zerops-yaml/base-list). To customize your build environment use the `prepareCommands` attribute. @@ -504,7 +504,7 @@ _OPTIONAL._ Customises the Python runtime environment by installing additional d prepare commands:

-```yml +```yaml zerops: # hostname of your service - setup: app @@ -557,7 +557,7 @@ You can configure your prepare commands to be run in a single shell instance or The prepare runtime container does not contain your application code nor the built application. If you need to copy some folders or files from the build container to the runtime container (e.g. a configuration file) use the `addToRunPrepare` attribute in the [build section](#build-pipeline-configuration). -```yml +```yaml zerops: # hostname of your service - setup: app @@ -576,13 +576,13 @@ zerops: ... ``` -In the example above Zerops will copy the `runtime-config.yml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. +In the example above Zerops will copy the `runtime-config.yaml` file from your build container **after the build has finished** into the new **prepare runtime** container. The copied files and folders will be available in the `xxx` folder in the new prepare runtime container before the prepare commands are triggered. ### initCommands _OPTIONAL._ Defines one or more commands to be run each time a new runtime container is started or a container is restarted. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -622,7 +622,7 @@ _OPTIONAL._ Defines the environment variables for the runtime environment. Enter one or more env variables in following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -643,7 +643,7 @@ Read more about [environment variables](/python/how-to/env-variables) in Zerops. _REQUIRED._ Defines the start command for your Python application. -```yml +```yaml zerops: # hostname of your service - setup: app @@ -677,7 +677,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -727,7 +727,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -756,7 +756,7 @@ _OPTIONAL._ Defines cron jobs. Setup cron jobs in the following format: -```yml +```yaml zerops: # define hostname of your service - setup: app @@ -795,7 +795,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app @@ -845,7 +845,7 @@ Following attributes are available: **Example:** -```yml +```yaml zerops: # hostname of your service - setup: app diff --git a/apps/docs/content/python/how-to/build-process.mdx b/apps/docs/content/python/how-to/build-process.mdx index df59e7962..e339f192b 100644 --- a/apps/docs/content/python/how-to/build-process.mdx +++ b/apps/docs/content/python/how-to/build-process.mdx @@ -44,11 +44,11 @@ The build cancellation is available before the build pipeline is finished. When The default Python build environment contains: - {data.alpine.default} -- selected version of Python defined in `zerops.yml` [build.base](/python/how-to/build-pipeline#base) parameter +- selected version of Python defined in `zerops.yaml` [build.base](/python/how-to/build-pipeline#base) parameter - [zCLI](/references/cli), Zerops command line tool - `pip` and `git` -If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/python/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/python/how-to/build-pipeline#preparecommands) commands to your `zerops.yml`. +If you prefer the Ubuntu OS instead of Alpine, set the [build.os](/python/how-to/build-pipeline#os) attribute to `ubuntu`. To install additional packages or tools add one or more [build.prepareCommands](/python/how-to/build-pipeline#preparecommands) commands to your `zerops.yaml`. :::info The application code is available in the `/var/www` folder in your build container before the prepare commands are triggered. This allows you to use any file from your application code in your prepare commands (e.g. a configuration file). diff --git a/apps/docs/content/python/how-to/create.mdx b/apps/docs/content/python/how-to/create.mdx index a0ce080a5..04a215582 100644 --- a/apps/docs/content/python/how-to/create.mdx +++ b/apps/docs/content/python/how-to/create.mdx @@ -7,6 +7,7 @@ import Image from '/src/components/Image'; import data from '@site/static/data.json'; import UnorderedList from '@site/src/components/UnorderedList'; import Video from '@site/src/components/Video'; +import ResourceTable from '/src/components/ResourceTable'; Zerops provides a Python runtime service with extensive build support. Python runtime is highly scalable and customisable to suit both development and production. @@ -81,32 +82,7 @@ Choose the CPU mode when starting a new service or change it later. The CPU mode Vertical auto scaling has following default configuration: -
Specifies the service type and version.
- See what [PostgreSQL service types](/references/importyml/type-list#database-services) are currently supported. + See what [PostgreSQL service types](/references/import-yaml/type-list#database-services) are currently supported.
- - - - - - - - - - - - - - - - - - - - - - - - -
Resources TypeMinimum resourceMaximum resource
CPU cores15
RAM0.25 GB32 GB
Disk5 GB100 GB
+ Python service always starts with the minimal resources. @@ -183,7 +159,7 @@ Zerops uses a yaml format to describe the project infrastructure. #### Basic example: -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -206,7 +182,7 @@ services: S3_ACCESS_SECRET: 'ogFthuiLYki8XoL73opSCQ' ``` -The yaml file describes your future project infrastructure. The project will contain one Python version 3.12 service with default [auto scaling](/python/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yml](/python/how-to/build-pipeline#ports). Following secret env variables will be configured: +The yaml file describes your future project infrastructure. The project will contain one Python version 3.12 service with default [auto scaling](/python/how-to/scaling) configuration. Hostname will be set to "app", the internal port(s) the service listens on will be defined later in the [zerops.yaml](/python/how-to/build-pipeline#ports). Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -215,7 +191,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" #### Full example: -Create a directory my-project. Create an description.yml file inside the my-project directory with following content: +Create a directory my-project. Create an description.yaml file inside the my-project directory with following content: ```yaml # basic project data @@ -264,7 +240,7 @@ services: The yaml file describes your future project infrastructure. The project will contain a Python service and a [PostgreSQL](/postgresql/overview) service. -Python service with "app" hostname, the internal port(s) the service listens on will be defined later in the zerops.yml. Python service will run on version 3.12 with a custom vertical and horizontal scaling. Following secret env variables will be configured: +Python service with "app" hostname, the internal port(s) the service listens on will be defined later in the zerops.yaml. Python service will run on version 3.12 with a custom vertical and horizontal scaling. Following secret env variables will be configured: ```env S3_ACCESS_KEY_ID="P8cX1vVVb" @@ -273,7 +249,7 @@ S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" The hostname of the PostgreSQL service will be set to "db". The [single container](/postgresql/how-to/create#single-container) mode will be chosen and the default [auto scaling configuration](/postgresql/how-to/create#set-auto-scaling-configuration) will be set. -#### Description of description.yml parameters +#### Description of description.yaml parameters The `project:` section is required. Only one project can be defined. @@ -305,7 +281,7 @@ The `project:` section is required. Only one project can be defined. -At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Python and PostgreSQL services but you can create a `description.yml` with your own combination of [services](/features/infrastructure). +At least one service in `services:` section is required. You can create a project with multiple services. The example above contains Python and PostgreSQL services but you can create a `description.yaml` with your own combination of [services](/features/infrastructure). @@ -335,7 +311,7 @@ At least one service in `services:` section is required. You can create a projec @@ -399,9 +375,9 @@ At least one service in `services:` section is required. You can create a projec
Specifies the service type and version.
- See what [Python service types](/references/importyml/type-list#runtime-services) are currently supported. + See what [Python service types](/references/import-yaml/type-list#runtime-services) are currently supported.
-### Create a project based on the description.yml +### Create a project based on the description.yaml -When you have your `description.yml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. +When you have your `description.yaml` ready, use the `zcli project project-import` command to create a new project and the service infrastructure. ```sh Usage: @@ -414,11 +390,11 @@ Flags: --workingDie string Sets a custom working directory. Default working directory is the current directory. (default "./") ``` -Zerops will create a project and one or more services based on the `description.yml` content. +Zerops will create a project and one or more services based on the `description.yaml` content. -Maximum size of the `description.yml` file is 100 kB. +Maximum size of the `description.yaml` file is 100 kB. -You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yml`. +You don't specify the project name in the `zcli project project-import` command, because the project name is defined in the `description.yaml`. If you have access to more than one client, you must specify the client ID for which the project is to be created. The `clientID` is located in the Zerops GUI under the client name on the project dashboard page. @@ -434,7 +410,7 @@ If you have access to more than one client, you must specify the client ID for w #### Example: -Create a directory `my-project` if it doesn't exist. Create an `import.yml` file inside the `my-project` directory with following content: +Create a directory `my-project` if it doesn't exist. Create an `import.yaml` file inside the `my-project` directory with following content: ```yaml # basic project data @@ -464,9 +440,9 @@ S3_ACCESS_KEY_ID="P8cX1vVVb" S3_ACCESS_SECRET="ogFthuiLYki8XoL73opSCQ" ``` -The content of the `services:` section of `import.yml` is identical to the project description file. The `import.yml` never contains the `project:` section because the project already exists. +The content of the `services:` section of `import.yaml` is identical to the project description file. The `import.yaml` never contains the `project:` section because the project already exists. -When you have your `import.yml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. +When you have your `import.yaml` ready, use the `zcli project service-import` command to add one or more services to your existing Zerops project. ```sh Usage: @@ -480,4 +456,4 @@ Flags: zCLI commands are interactive, when you press enter after `zcli project service-import importYamlPath`, you will be given a list of your projects to choose from. -Maximum size of the import.yml file is 100 kB. +Maximum size of the import.yaml file is 100 kB. diff --git a/apps/docs/content/python/how-to/customize-runtime.mdx b/apps/docs/content/python/how-to/customize-runtime.mdx index a755a0d77..5e7e4aa12 100644 --- a/apps/docs/content/python/how-to/customize-runtime.mdx +++ b/apps/docs/content/python/how-to/customize-runtime.mdx @@ -22,9 +22,9 @@ The default Python runtime environment contains: - Git and PIP :::note -To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yml/specification#os--1) attribute. +To use Ubuntu instead of the default Alpine, set the [run.os](/zerops-yaml/specification#os--1) attribute. -Additional packages and tools can be installed using [run.prepareCommands](/zerops-yml/specification#preparecommands--1). +Additional packages and tools can be installed using [run.prepareCommands](/zerops-yaml/specification#preparecommands--1). ::: ## Runtime Flow diff --git a/apps/docs/content/python/how-to/deploy-process.mdx b/apps/docs/content/python/how-to/deploy-process.mdx index e7d25f8d5..97211a54a 100644 --- a/apps/docs/content/python/how-to/deploy-process.mdx +++ b/apps/docs/content/python/how-to/deploy-process.mdx @@ -40,7 +40,7 @@ Zerops performs following actions for each new container: Services with multiple containers are deployed in parallel. :::info -If your application needs to be initialized in each runtime container, add [init commands](/python/how-to/build-pipeline#initcommands) to `zerops.yml`. +If your application needs to be initialized in each runtime container, add [init commands](/python/how-to/build-pipeline#initcommands) to `zerops.yaml`. ::: :::caution @@ -58,7 +58,7 @@ The old containers are then removed from the project balancer so they don't rece ## Readiness checks -If your application isn't ready to handle requests right after it is started via the [start command](/python/how-to/build-pipeline#start), configure a [readiness check](/python/how-to/build-pipeline#readiness-check) in your `zerops.yml`. +If your application isn't ready to handle requests right after it is started via the [start command](/python/how-to/build-pipeline#start), configure a [readiness check](/python/how-to/build-pipeline#readiness-check) in your `zerops.yaml`. If the readiness check is defined, Zerops will: @@ -94,7 +94,7 @@ The list of application versions is available in Zerops GUI. Go to the service d The pipeline detail is accessible from the additional menu. The pipeline detail contains -- The pipeline config (`zerops.yml`) that was used for the selected version +- The pipeline config (`zerops.yaml`) that was used for the selected version - The build log (if available) - The prepare runtime log (if available) diff --git a/apps/docs/content/python/how-to/env-variables.mdx b/apps/docs/content/python/how-to/env-variables.mdx index 99ce45a80..0345b09dd 100644 --- a/apps/docs/content/python/how-to/env-variables.mdx +++ b/apps/docs/content/python/how-to/env-variables.mdx @@ -23,12 +23,12 @@ There are 3 different sets of env variables in Zerops: basic build - zerops.yml + zerops.yaml basic runtime - zerops.yml + zerops.yaml secret @@ -41,13 +41,13 @@ There are 3 different sets of env variables in Zerops: Use the [secret env variables](/python/how-to/create#set-secret-environment-variables) for all sensitive data you don't want to store in your application code. Secret env variables are also useful if you need for testing where you need to change the value of some env variables frequently. Secret variables are managed in Zerops GUI and you don't have to redeploy your application. -The basic build and runtime env variables are listed in your [zerops.yml](/zerops-yml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yml and redeploy your application to Zerops. +The basic build and runtime env variables are listed in your [zerops.yaml](/zerops-yaml/specification) and deployed together with your application code. When you need to update a value of an existing env variable or change the set of build or runtime env variables, update your zerops.yaml and redeploy your application to Zerops. You can [reference](/python/how-to/env-variables#reference-a-local-variable-in-another-variable-value) another variable of the same service or even a variable of [another service](/python/how-to/env-variables#reference-a-variable-of-another-project-service) within the same project. ## Set secret env variables in Zerops GUI -Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yml. +Use secret variables to store passwords, tokens and other sensitive information that shouldn't be part of your repository and listed in zerops.yaml.

- - - Resources Type - Minimum resource - Maximum resource - - - - - CPU cores - 1 - 5 - - - RAM - 0.25 GB - 32 GB - - - Disk - 1 GB - 100 GB - - - - + Python service always starts with the minimal resources. @@ -207,7 +182,7 @@ The scale up of RAM or disk is immediate. The scale up of CPU is configured to b The **minimum step** for the vertical scaling is - 1 CPU core -- 0.25 GB RAM +- 0.125 GB RAM - 0.5 GB disk When the application is under a heavy load and needs to scale up faster, the scaling step will increase automatically. diff --git a/apps/docs/content/python/how-to/shared-storage.mdx b/apps/docs/content/python/how-to/shared-storage.mdx index a99a32ec8..96055c380 100644 --- a/apps/docs/content/python/how-to/shared-storage.mdx +++ b/apps/docs/content/python/how-to/shared-storage.mdx @@ -37,15 +37,15 @@ zCLI is the Zerops command-line tool. To create a new Python service via the com Zerops uses a yaml format to describe the project infrastructure. -#### description.yml format +#### description.yaml format -[Read the basics](/python/how-to/create#create-a-project-description-file) how to define the Python service using the description.yml. +[Read the basics](/python/how-to/create#create-a-project-description-file) how to define the Python service using the description.yaml. #### Example with a shared storage -Create a directory `my-project`. Create an `description.yml` file inside the `my-project` directory with following content: +Create a directory `my-project`. Create an `description.yaml` file inside the `my-project` directory with following content: -```yml +```yaml # basic project data project: # project name @@ -91,4 +91,4 @@ The mount attribute accepts an array of shared storage names you want to mount t ### Create a project with a Python service and a shared storage -Follow the article [How to create a project based on the description.yml](/python/how-to/create#create-a-project-based-on-the-descriptionyml). +Follow the article [How to create a project based on the description.yaml](/python/how-to/create#create-a-project-based-on-the-descriptionyaml). diff --git a/apps/docs/content/python/how-to/trigger-pipeline.mdx b/apps/docs/content/python/how-to/trigger-pipeline.mdx index 210dbdcfc..32f8ce251 100644 --- a/apps/docs/content/python/how-to/trigger-pipeline.mdx +++ b/apps/docs/content/python/how-to/trigger-pipeline.mdx @@ -20,7 +20,7 @@ Integrate Zerops to your GitHub or GitLab repository and configure the automatic Follow these steps: -1. Add [zerops.yml](/python/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. +1. Add [zerops.yaml](/python/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. 2. Connect your GitHub repository or connect your GitLab repository Then each time you create a new tag or push to a specific branch, depending on the configuration, GitHub or GitLab will initiate a new build & deploy pipeline. @@ -35,7 +35,7 @@ Then each time you create a new tag or push to a specific branch, depending on t

:::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ### Skip the automatic pipeline once @@ -61,13 +61,13 @@ To start a new build & deploy pipeline manually, use the Zerops CLI. Follow these steps: -1. Add `zerops.yml` to your repository. +1. Add `zerops.yaml` to your repository. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli push` command. The `zcli push` command uploads your application code, builds and deploys your application in Zerops. -The command triggers the [build pipeline](/python/how-to/trigger-pipeline) defined in `zerops.yml`. `zerops.yml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. +The command triggers the [build pipeline](/python/how-to/trigger-pipeline) defined in `zerops.yaml`. `zerops.yaml` must be in the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. zCLI uploads all files and subdirectories of the working directory to Zerops and starts the build pipeline. If the `.gitignore` file is found, it is interpreted and the defined files and folders will be ignored. @@ -90,14 +90,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` zCLI commands are interactive, when you press enter after `zcli push`, you will be given a list of your projects to choose from. :::info -You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yml` in your repository. +You can change the build and deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your repository. ::: ## Manual deploy using Zerops CLI @@ -106,7 +106,7 @@ To start only a deploy pipeline, use the Zerops CLI. Follow these steps: -1. Add [zerops.yml](/python/how-to/build-pipeline#add-zeropsyml-to-your-repository) to your repository. Omit the build section. +1. Add [zerops.yaml](/python/how-to/build-pipeline#add-zeropsyaml-to-your-repository) to your repository. Omit the build section. 2. [Install & setup zCLI](/references/cli) the Zerops command line tool. 3. Run `zcli service deploy` command. @@ -121,8 +121,8 @@ Usage: Flags: --archiveFilePath string If set, zCLI creates a tar.gz archive with the application code in the required path relative to the working directory. By default, no archive is created. - --deployGitFolder Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --deployGitFolder Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. -h, --help the service deploy command. --projectId string If you have access to more than one project, you must specify the project ID for which the command is to be executed. @@ -130,14 +130,14 @@ Flags: command is to be executed. --versionName string Adds a custom version name. Automatically filled if the VERSIONNAME environment variable exists. --workingDir string Sets a custom working directory. Default working directory is the current directory. (default "./") - --zeropsYamlPath string Sets a custom path to the zerops.yml file relative to the working directory. By default zCLI - looks for zerops.yml in the working directory. + --zeropsYamlPath string Sets a custom path to the zerops.yaml file relative to the working directory. By default zCLI + looks for zerops.yaml in the working directory. ``` `pathToFileOrDir` defines a path to one or more directories and/or files relative to the working directory. The working directory is by default the current directory and can be changed using the
`--workingDir` flag. -`zerops.yml` must be placed in the working directory. +`zerops.yaml` must be placed in the working directory. :::info -You can change the deploy pipeline when you need to. Just simply modify the `zerops.yml` in your working directory. +You can change the deploy pipeline when you need to. Just simply modify the `zerops.yaml` in your working directory. ::: diff --git a/apps/docs/content/python/how-to/upgrade.mdx b/apps/docs/content/python/how-to/upgrade.mdx index 0e3146931..33162f47e 100644 --- a/apps/docs/content/python/how-to/upgrade.mdx +++ b/apps/docs/content/python/how-to/upgrade.mdx @@ -3,6 +3,6 @@ title: How to upgrade the Python version description: Learn how to upgrade your python service's version --- -You can upgrade or downgrade your Python service to a different major Python version by setting the `run.base` parameter in your `zerops.yml`. When you [trigger a new pipeline](/python/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Python version. If you don't specify the `run.base` attribute in your `zerops.yml`, Zerops keeps the current Python version for your runtime. +You can upgrade or downgrade your Python service to a different major Python version by setting the `run.base` parameter in your `zerops.yaml`. When you [trigger a new pipeline](/python/how-to/trigger-pipeline), Zerops will start new runtime container(s) with the required Python version. If you don't specify the `run.base` attribute in your `zerops.yaml`, Zerops keeps the current Python version for your runtime. -If you want to build your application with a different major Python version, change the `build.base` parameter in your `zerops.yml`. The `build.base` is the required attribute. +If you want to build your application with a different major Python version, change the `build.base` parameter in your `zerops.yaml`. The `build.base` is the required attribute. diff --git a/apps/docs/content/python/overview.mdx b/apps/docs/content/python/overview.mdx index c7ae04d3b..644e5ee19 100644 --- a/apps/docs/content/python/overview.mdx +++ b/apps/docs/content/python/overview.mdx @@ -23,9 +23,9 @@ As said, there is no need for coding yet, we have created a [Github repository 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-python-hello-world/blob/main/import-project/description.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-python-hello-world/blob/main/import-project/description.yaml)): -```yml +```yaml project: name: my-first-project services: @@ -95,12 +95,12 @@ Do you have any questions? Check the step-by-step tutorial, browse the documenta }, { type: 'link', - href: '/python/how-to/build-pipeline#add-zeropsyml-to-your-repository', - label: 'zerops.yml', + href: '/python/how-to/build-pipeline#add-zeropsyaml-to-your-repository', + label: 'zerops.yaml', customProps: { icon: Icons['puzzle'], description: - 'See a full example of zerops.yml file to create your own app.', + 'See a full example of zerops.yaml file to create your own app.', }, }, { @@ -151,7 +151,7 @@ Have you build something that others might find useful? Don't hesitate to share 1. Log in/sign up to [Zerops GUI ↗](https://app.zerops.io) -2. In the **Projects** box click on **Import a project** and paste in the following yml config ([source ↗](https://github.com/zeropsio/recipe-python-hello-world/blob/main/import-project/description.yml)): +2. In the **Projects** box click on **Import a project** and paste in the following YAML config ([source ↗](https://github.com/zeropsio/recipe-python-hello-world/blob/main/import-project/description.yaml)): -```yml +```yaml project: name: my-first-project services: diff --git a/apps/docs/content/python/tutorial/runtime-sql.mdx b/apps/docs/content/python/tutorial/runtime-sql.mdx index b321e70f7..37b776d3d 100644 --- a/apps/docs/content/python/tutorial/runtime-sql.mdx +++ b/apps/docs/content/python/tutorial/runtime-sql.mdx @@ -23,7 +23,7 @@ In the detail of each step, you can find a link with more information about the
2. Create a project.

- Learn more about projects in + Learn more about projects in Zerops. See how to import a whole project into Zerops.

@@ -31,7 +31,7 @@ In the detail of each step, you can find a link with more information about the
3. In the left menu, click on Import services, copy & paste the - contents of the `import-services.yml` config file from the recipe + contents of the `import-services.yaml` config file from the recipe repository of your choice. Then click on Import service.

diff --git a/apps/docs/content/python/tutorial/step-by-step.mdx b/apps/docs/content/python/tutorial/step-by-step.mdx index 5b6d35a64..135216c8e 100644 --- a/apps/docs/content/python/tutorial/step-by-step.mdx +++ b/apps/docs/content/python/tutorial/step-by-step.mdx @@ -23,7 +23,7 @@ In the detail of each step, you can find a link with more information about the

2. Create a project.

- Learn more about projects in + Learn more about projects in Zerops. See how to import a whole project into Zerops.

@@ -31,7 +31,7 @@ In the detail of each step, you can find a link with more information about the
3. In the left menu, click on Import services, copy & paste the - contents of this yaml file and click on Import service. + contents of this yaml file and click on Import service.

Learn more about services in diff --git a/apps/docs/content/qdrant/overview.mdx b/apps/docs/content/qdrant/overview.mdx new file mode 100644 index 000000000..b82a12013 --- /dev/null +++ b/apps/docs/content/qdrant/overview.mdx @@ -0,0 +1,62 @@ +--- +title: Qdrant +desc: Production-ready Qdrant vector database on Zerops platform with managed infrastructure, automatic cluster configuration, and built-in high availability. +--- + +import UnorderedList from '@site/src/components/UnorderedList'; +import UnorderedCodeList from '@site/src/components/UnorderedCodeList'; +import data from '@site/static/data.json'; + +[Qdrant](https://qdrant.tech/) on Zerops provides a fully managed vector database solution designed for AI applications. Focus on building vector search features while we handle infrastructure maintenance, high availability, and data protection. + +## Supported Versions + +Currently supported Qdrant versions: + + +Import configuration version: + + +## Deployment Modes + +#### Non-HA Mode +- Single node setup ideal for development and non-production projects +- Simple deployment and management + +#### HA Cluster +- Automatically configured with 3 nodes +- Recommended for production environments +- Built-in data replication across nodes +- By default (`automaticClusterReplication=true`), automatically creates replicas of all shards across all three nodes + - Can be disabled by setting `automaticClusterReplication` to `false` +- Automatic cluster recovery and node replacement in case of failures + +## Data Backup + +Backups are performed in `snapshot` format. For HA Cluster, backups are created on the primary container (leader) and saved to the local disk before being compressed and streamed to backup storage. The local file is then deleted. + +For general information about backup frequency and storage limits, see our [Backup documentation](/features/backup). + +## Network Architecture & Access + +Qdrant can be accessed only from services within the same project, public access is not available. + +### API Keys +API key authentication is required for both HTTP and gRPC API calls. Include the key in your request headers. The keys can be found in generated environment variables of the service: + +- **API Key:** Full access API key for administrative operations (creating collections, indexing) +- **Read-only API Key:** Restricted API key for search operations + +#### HTTP API +- **Port:** `6333` +- **Connection String:** `http://${hostname}:${port}` + +#### gRPC API +- **Port:** `6334` +- **gRPC Connection String:** `tcp://${hostname}:${grpcPort}` + +## Support + +For advanced configurations or custom requirements: +- Join our [Discord community](https://discord.gg/zeropsio) +- Contact support via [email](mailto:support@zerops.io) \ No newline at end of file diff --git a/apps/docs/content/references/api.mdx b/apps/docs/content/references/api.mdx new file mode 100644 index 000000000..38d980096 --- /dev/null +++ b/apps/docs/content/references/api.mdx @@ -0,0 +1,111 @@ +--- +title: REST API Reference +desc: Overview of Zerops REST API endpoints and authentication, designed to help you integrate with Zerops programmatically +--- + +The Zerops REST API allows you to programmatically interact with Zerops platform by providing access to resources like projects, services, users, billing, and configurations. + +## Base URL + +All API requests should be made to: +``` +https://api.app-prg1.zerops.io/api/rest/public +``` + +## Authentication + +The API uses Bearer token authentication. You can obtain your Personal access token from the **Access Token management** section in the Zerops GUI. + +Include the token in the Authorization header: +``` +Authorization: Bearer +``` + +## API Resources + +:::note +Some resource groups have non-obvious naming: +- `/service-stack` endpoints handle services management +- `/user-data` endpoints handle environment variables management +::: + +View the [full Swagger documentation](https://api.app-prg1.zerops.io/api/rest/public/swagger) or jump to a specific resource group: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GroupDescription
/app-versionManage application versions, builds, and deployments
/authAuthentication and token management
/billingBilling operations and payment management
/clientClient account management
/client-userUser management within client accounts
/githubGitHub repository connections and authorization
/gitlabGitLab repository connections and authorization
/projectProject management operations
/project-envProject environment variables management
/public-http-routingHTTP routing configuration
/public-port-routingPort routing and firewall rules configuration
/service-stackService stack operations and configuration
/settingsSystem settings and configurations
/userUser account management
/user-dataEnvironment variables management
/user-notificationUser notifications management
/user-tokenPersonal access tokens management
\ No newline at end of file diff --git a/apps/docs/content/references/cli.mdx b/apps/docs/content/references/cli.mdx index 0d53e9df5..65afba042 100644 --- a/apps/docs/content/references/cli.mdx +++ b/apps/docs/content/references/cli.mdx @@ -6,9 +6,9 @@ description: Learn how to install and use zCLI, the powerful command-line tool f import CustomCard from '/src/components/CustomCard'; import Image from '/src/components/Image'; -## What is zCLI? +zCLI is the command-line tool for Zerops that allows users to manage services, simplify interactions, and configure infrastructure directly from the terminal. -zCLI is the command-line tool for Zerops that allows users to manage services, simplify interactions, configure infrastructure directly from the terminal. +For detailed information, see the [Configuration](/references/cli/configuration) and [Commands Reference](/references/cli/commands) pages. ## Platforms @@ -20,20 +20,17 @@ zCLI currently supports: ## Get started -To get started, you may install **zCLI** globally using [NPM](https://www.npmjs.com) or [Yarn](https://yarnpkg.com/) package manager: +### Manual Installation -```sh -npm i -g @zerops/zcli -``` +To download the zCLI directly, get the [latest release](https://github.com/zeropsio/zcli/releases) from GitHub. + +### Linux/MacOS ```sh -yarn global add @zerops/zcli +curl -L https://zerops.io/zcli/install.sh | sh ``` - - To download the zCLI directly, get the [latest - ↗](https://github.com/zeropsio/zcli/releases) release from GitHub. - +zCLI will be installed inside `/usr/bin` or `/usr/local/bin`. ### Windows @@ -43,13 +40,17 @@ irm https://zerops.io/zcli/install.ps1 | iex zCLI will be installed inside `C:\Program Files\` or `C:\Program Files (x86)\` -### Linux/MacOS +### Using Package Managers + +You can also install zCLI using package managers: ```sh -curl -L https://zerops.io/zcli/install.sh | sh +npm i -g @zerops/zcli ``` -zCLI will be installed inside `/usr/bin` or `/usr/local/bin`. +```sh +yarn global add @zerops/zcli +``` ### NixOS @@ -102,8 +103,4 @@ You may use an access token to access Zerops using this command: ```sh zcli login -``` - -## References - -[zCLI Commands and Usage](/references/cli/commands) +``` \ No newline at end of file diff --git a/apps/docs/content/references/cli/access-logs.mdx b/apps/docs/content/references/cli/access-logs.mdx deleted file mode 100644 index dca65bab0..000000000 --- a/apps/docs/content/references/cli/access-logs.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: How to access logs via zCLI -description: Learn more about how you can access your logs via zCLI. ---- - -To start the VPN you need first [install & setup zCLI](/references/cli), the Zerops command-line tool. - -## Build log - -To access a build log in Zerops CLI use - -```sh -zcli service log --showBuildLogs -``` - -The command returns the build log to `stdout` with a streaming option. By default the command returns the last 100 log messages and exits. Use the `--follow` flag to continuously pool for new log messages. - -#### Command annotation - -```sh -Usage: - zcli service log [flags] - -Flags: - --follow If set, zCLI will continuously poll for new log messages. By default, the command will exit - once there are no more logs to display. To exit from this mode, use Control-C. - --format string The format of returned log messages. Following formats are supported: - FULL: This is the default format. Messages will be returned in the complete Syslog format. - SHORT: Returns only timestamp and log message. - JSON: Messages will be returned as one JSON object. - JSONSTREAM: Messages will be returned as stream of JSON objects. (default "FULL") - --formatTemplate string Set a custom log format. Can be used only with --format=FULL. - Example: --formatTemplate="{{.timestamp}} {{.severity}} {{.facility}} {{.message}}". - Supports standard GoLang template format and functions. - -h, --help the service log command. - --limit int How many of the most recent log messages will be returned. Allowed interval is <1;1000>. - Default value = 100. (default 100) - --messageType string Select either APPLICATION or WEBSERVER log messages to be returned. Default value = APPLICATION. (default "APPLICATION") - --minimumSeverity string Returns log messages with requested or higher severity. Set either severity number in the interval - <0;7> or one of following severity codes: - EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFORMATIONAL, DEBUG. - --projectId string If you have access to more than one project, you must specify the project ID for which the - command is to be executed. - --serviceId string If you have access to more than one service, you must specify the service ID for which the - command is to be executed. - --showBuildLogs If set, zCLI will return build log messages instead of runtime log messages. -``` - -zCLI commands are interactive, when you press enter after `zcli service log`, you will be given a list of your projects to choose from. - -## Runtime log - -To access the log of the first runtime container in Zerops CLI use - -```sh -zcli service log -``` - -The command returns the runtime log of the first container to `stdout` with a streaming option. By default the command returns the last 100 log messages and exits. Use the `--follow` flag to continuously pool for new log messages. diff --git a/apps/docs/content/references/cli/commands.mdx b/apps/docs/content/references/cli/commands.mdx index 031b886fe..24c9d4a0b 100644 --- a/apps/docs/content/references/cli/commands.mdx +++ b/apps/docs/content/references/cli/commands.mdx @@ -1,280 +1,301 @@ --- -title: Available Commands -description: The available commands in our command line tool which you can use to interact with Zerops. +title: Zerops CLI Commands Reference +description: A comprehensive reference for all available commands in the Zerops command line tool (zcli) --- -## Usage + +## Basic Usage ```sh -zcli {command} [flags] +zcli [flags] ``` -### Example output - -```sh title="bash" -Welcome in Zerops! -You are loged as -and your VPN connection is not active. - -Usage: -────── -zcli [flags] -zcli [command] - -Available Commands: -─────────────────── -completion Generate the autocompletion script for the specified shell -env Displays global environment variables, their paths and additional options -help Help about any command -login Login into Zerops with generated Zerops token -logout Disconnect from VPN and log out from your Zerops account -project Project commands group -push Builds your application in Zerops and deploys it -scope Scope commands group -service Zerops service commands group -show-debug-logs Shows zCLI debug logs -support How to contact Zerops support for assistance -version Shows the current zCLI version -vpn VPN commands group - -Flags: -────── - -h, --help help for zcli - -Use "zcli [command] --help" for more information about a command. -``` +:::note Tip +All commands support the `-h, --help` flag which displays help information about the command. +::: -## Commands +:::tip Configuration +For detailed information about configuration options, environment variables, and logging, see the [Zerops CLI Configuration](/references/cli/configuration) page. +::: ---- +## Command Groups +- [Account & VPN](#account--vpn) +- [Project Management](#project-management) +- [Service Operations](#service-operations) +- [Utility Commands](#utility-commands) + +## Account & VPN -### help +### login -This command lists available commands and flags on a command by placing `help`, `-h` or `--help` flag after the command. +Logs you into Zerops using a generated token or your login credentials. ```sh -zcli help -# or -zcli --help -# or -zcli -h +zcli login ``` ---- +### logout -### env +Disconnects from VPN and logs out from your Zerops account. -Displays global environment variables, their paths and additional options. +```sh +zcli logout +``` + +### vpn up + +Connects to the Zerops VPN. ```sh -zcli env [flags] +zcli vpn up [projectId] [flags] ``` -#### Available flags -- `-h, --help`: Help for the env command +**Flags:** +- `--auto-disconnect` - Automatically disconnect from VPN if already connected +- `--mtu int` - Set custom MTU value for Wireguard interface (default: 1420) +- `--projectId string` - Required when you have access to multiple projects ---- +:::note +You can set a default project ID for VPN connections in a `.zcli.yml` file or via the `ZEROPS_PROJECTID` environment variable. See the [Configuration](/references/cli/configuration) page for details. +::: -### completion +### vpn down -Generate the autocompletion script for the specified shell. +Disconnects from the Zerops VPN. ```sh -zcli completion {bash|fish|powershell|zsh} [flags] +zcli vpn down ``` -#### Available flags -- `-h, --help`: Help for completion -- `--no-descriptions`: Disable completion descriptions (bash only) +:::note +For more detailed information about Zerops VPN configuration and troubleshooting, visit the [VPN Documentation](/references/vpn). +::: ---- +## Project Management -### login +### project list -Logs you into Zerops. Use a generated Zerops token or your login e-mail and password. +Lists all projects you have access to. ```sh -zcli login +zcli project list ``` ---- - -### project +### project delete -Project related commands. +Deletes a project and all its services. ```sh -zcli project {sub-command} [arguments] [flags] +zcli project delete [projectId] [flags] ``` -#### Available sub-commands +**Flags:** +- `--confirm` - Skip confirmation prompts for destructive operations +- `--projectId string` - Required when you have access to multiple projects -- `delete`: Deletes a project and all of its services -- `list`: Lists all projects -- `project-import`: Creates a new project with one or more services -- `service-import`: Creates one or more Zerops services in an existing project +### project project-import -#### Available flags +Creates a new project with one or more services from a YAML definition. -- `delete` +```sh +zcli project project-import [flags] +``` - - `--confirm`: If set, zCLI will not ask for confirmation of destructive operations - - `--projectId `: Required if you have access to multiple projects - - `-h, --help`: Help for project delete +**Flags:** +- `--orgId string` - Organization ID where the project should be created (required for multiple organizations) +- `--workingDir string` - Sets a custom working directory (default: "./") -- `list` +### project service-import - - `-h, --help`: Help for project list +Creates one or more services in an existing project from a YAML definition. -- `project-import` +```sh +zcli project service-import [flags] +``` - - `--orgId `: Required if you have access to multiple organizations - - `--workingDir `: Sets custom working directory (default: "./") - - `-h, --help`: Help for project import +**Flags:** +- `--projectId string` - Required when you have access to multiple projects ---- +### scope project -### push +Sets the default project for commands that require a project ID. ```sh -zcli push {flags} +zcli scope project [projectId] ``` -#### Available flags +:::tip +Instead of using the `scope project` command, you can also set a default project ID in a `.zcli.yml` file or via the `ZEROPS_PROJECTID` environment variable. See the [Configuration](/references/cli/configuration) page for details. +::: -- `--archiveFilePath `: Creates a tar.gz archive of the application code at the specified path relative to the working directory. If not set, no archive is created. -- `--deployGitFolder`: Includes the `.git` folder in the upload. By default, the `.git` folder is excluded. -- `--projectId `: Required if you have access to multiple projects. Specifies the target project ID for command execution. -- `--serviceId `: Required if you have access to multiple services. Specifies the target service ID for command execution. -- `--versionName `: Sets a custom version name. If the `VERSIONNAME` environment variable exists, its value is used automatically. -- `--workingDir `: Sets a custom working directory. Defaults to the current directory (`./`). -- `--zeropsYamlPath `: Specifies a custom path to the `zerops.yml` file relative to the working directory. By default, zCLI looks for `zerops.yml` in the working directory. +### scope reset ---- - -### scope +Resets the default project and service scope. ```sh -zcli scope [sub-command] +zcli scope reset ``` -#### Available sub-commands +## Service Operations -- `project`: Sets the scope for project. All commands that require project ID will use the selected one. -- `reset`: Resets the scope for project and service. +### service list -#### Required parameters +Lists all services in a project. -- `project-id` +```sh +zcli service list [flags] +``` ---- +**Flags:** +- `--projectId string` - Required when you have access to multiple projects -### service +### service push -Service related commands. +Builds your application in Zerops and deploys it. This is the recommended way to deploy your code. ```sh -zcli service {sub-command} [arguments] [flags] +zcli service push [serviceIdOrName] [flags] ``` -#### Available sub-commands - -- `delete` - Deletes the Zerops service -- `deploy` - Deploys your application to Zerops -- `enable-subdomain` - Enables access through Zerops subdomain -- `list` - Lists all services in the project -- `log` - Get service runtime or build log to stdout -- `push` - Builds your application in Zerops and deploys it -- `start` - Starts the Zerops service -- `stop` - Stops the Zerops service +**Flags:** +- `--archiveFilePath string` - Creates a tar.gz archive with application code +- `-g, --deployGitFolder` - Include the .git folder in the upload +- `--disableLogs` - Disable logs during push +- `-v, --verbose` - Log additional debug data to the zCLI [debug log file](/references/cli/configuration#logging-configuration) +- `--projectId string` - Required when you have access to multiple projects +- `--serviceId string` - Required when you have access to multiple services +- `--setup string` - Choose setup to use from zerops.yml +- `--versionName string` - Adds a custom version name +- `--workingDir string` - Sets a custom working directory (default: "./") +- `-w, --workspaceState string` - Defines version of workspace to push: + - `clean` - pushes the HEAD without local changes + - `staged` - pushes only staged files + - `all` - pushes all staged and unstaged files (default) +- `--zeropsYamlPath string` - Sets a custom path to the zerops.yml file -#### Available flags +:::tip +You can also use `zcli push` as a shorthand for `zcli service push`. -- `delete` +To avoid specifying `--projectId` and `--serviceId` flags repeatedly, you can set default values in a `.zcli.yml` file or via environment variables. See the [Configuration](/references/cli/configuration) page for details. +::: - - `--confirm`: If set, zCLI will not ask for confirmation of destructive operations - - `--projectId `: Required if you have access to multiple projects - - `--serviceId `: Required if you have access to multiple services +### service deploy -- `deploy` +Deploys your application to Zerops. Similar to `push` but focuses on deployment only. - - `--archiveFilePath `: Creates a tar.gz archive of the application code at the specified path - - `--deployGitFolder`: Includes the `.git` folder in the upload - - `--projectId `: Required if you have access to multiple projects - - `--serviceId `: Required if you have access to multiple services - - `--versionName `: Sets a custom version name - - `--workingDir `: Sets a custom working directory (default: `./`) - - `--zeropsYamlPath `: Specifies a custom path to the `zerops.yml` file +```sh +zcli service deploy [serviceIdOrName] +``` - See how to use [.deployignore](/zerops-yml/specification#deployignore) file. +**Flags:** +Same as service push command. -- `enable-subdomain` +### service start/stop - - `--projectId `: Required if you have access to multiple projects - - `--serviceId `: Required if you have access to multiple services +Commands to start or stop a Zerops service. -- `list` +```sh +zcli service start [serviceIdOrName] [flags] +zcli service stop [serviceIdOrName] [flags] +``` - - `--projectId `: Required if you have access to multiple projects +**Flags for both commands:** +- `--projectId string` - Required when you have access to multiple projects +- `--serviceId string` - Required when you have access to multiple services -- `log` +### service delete - - `--follow`: Continuously poll for new log messages - - `--format `: The format of returned log messages (FULL, SHORT, JSON, JSONSTREAM) - - `--formatTemplate