diff --git a/apps/docs/content/nats/overview.mdx b/apps/docs/content/nats/overview.mdx index a671e8a7..09f76fd5 100644 --- a/apps/docs/content/nats/overview.mdx +++ b/apps/docs/content/nats/overview.mdx @@ -27,28 +27,54 @@ Our NATS implementation features optimized default settings designed for common - 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. +::: + + + + + + + + + + + + + + + + + + +
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. -#### Disabling JetStream - -If you don't need message persistence, you can disable JetStream by setting the `JET_STREAM_ENABLED` environment variable to `0` in your service configuration. This can be done: - -- During service creation through the [import configuration](/references/import) -- In the Zerops GUI under service environment variables -- Via the [Zerops API](/references/api) when creating a new service - :::tip -Disabling JetStream may reduce resource usage when persistence isn't required for your application. +Disabling JetStream can reduce resource utilization for applications that don't require message persistence. ::: ### Deployment Modes diff --git a/apps/docs/static/llms-full.txt b/apps/docs/static/llms-full.txt index 450756bd..98a687b6 100644 --- a/apps/docs/static/llms-full.txt +++ b/apps/docs/static/llms-full.txt @@ -1,13 +1,8 @@ -This is the full developer documentation for Zerops. - # Start of Zerops documentation +---------------------------------------- - - sample answer - - - +# Bun > Getting Started This quick start allows you to get hands-on experience of Zerops, whether you only want to see it in action or want to start small and scale up the project size later. The purpose of this guide is to get an existing Bun application up and running easily. @@ -18,62 +13,17 @@ If you are already familiar with Zerops and you are interested in more detailed We have created a repository, a _recipe_, containing the most simple Bun web application, so you don't need to write any code yet. Choose from the options below which suits you best: - - ### Other recipes - - :::tip Did none of these Guides fit your needs? Join our **[Discord](https://discord.com/invite/WDvCZ54)** community to get help from our team and other members. ::: +---------------------------------------- + +# Bun > How To > Access + ## Private internal access @@ -119,7 +69,7 @@ Do not use `https://` when communicating with Bun over the VPN. The security is ### Connect via SSH -Use the `ssh` command to connect to your service via SSH. +Use the `ssh` command to connect to your service via SSH. ### Stop VPN connection @@ -138,7 +88,9 @@ By default, your Bun service is not publicly accessible. When your application i 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). +---------------------------------------- +# Bun > How To > Build Pipeline Zerops provides a customizable build and runtime environment for your Bun application. @@ -237,8 +189,6 @@ _REQUIRED._ Sets the base technology for the build environment. Following options are available for Bun builds: - - ```yaml zerops: # hostname of your service @@ -250,12 +200,10 @@ zerops: ... ``` -

The base build environment contains {data.alpine.default}, the selected major version of Bun, - Zerops command line tool, `npm`, + Zerops command line tool, `npm`, `yarn`, `git` and `npx` tools. -

:::info You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. @@ -298,8 +246,8 @@ Default value is `alpine`. We are currently using following os version: -- {data.alpine.default} -- {data.ubuntu.default} +- {data.alpine.default} +- {data.ubuntu.default} :::caution The os version is fixed and cannot be customised. @@ -315,7 +263,7 @@ _OPTIONAL._ Customises the build environment by installing additional dependenci The base build environment contains: -- {data.alpine.default} +- {data.alpine.default} - selected version of Bun defined in the [base](bun/how-to/build-pipeline#base) attribute - [Zerops command line tool](/references/cli) - `npm`, `yarn`, `git` and `npx` tools @@ -422,7 +370,7 @@ If the command ends successfully, it returns the exit code 0 and Zerops triggers ### deployFiles -_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. +_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. ```yaml # REQUIRED. Select which files / folders to deploy after @@ -490,7 +438,7 @@ By default, `./src/assets/fonts` deploys to `/var/www/src/assets/fonts`, keeping ::: #### .deployignore -Add a `.deployignore` file to the root of your project to specify which files and folders Zerops should ignore during deploy. The syntax follows the same pattern format as `.gitignore`. +Add a `.deployignore` file to the root of your project to specify which files and folders Zerops should ignore during deploy. The syntax follows the same pattern format as `.gitignore`. To ignore a specific file or directory path, start the pattern with a forward slash (`/`). Without the leading slash, the pattern will match files with that name in any directory. @@ -520,7 +468,7 @@ This example above ignores `file.txt` in ANY directory named `src`, such as: - `/src/src/file.txt` :::note -`.deployignore` file also works with `zcli service deploy` command. +`.deployignore` file also works with `zcli service deploy` command. ::: ### cache @@ -574,8 +522,6 @@ If you don't specify the `run.base` attribute, Zerops keeps the current Bun vers Following options are available for Bun runtimes: - - ```yaml zerops: # hostname of your service @@ -593,10 +539,8 @@ zerops: ... ``` -

The base runtime environment contains {data.alpine.default}, the selected major version of Bun, Zerops command line tool, `npm`, `yarn`, `git` and `npx` tools. -

:::info You can change the base environment when you need to. Just simply modify the `zerops.yaml` in your repository. @@ -641,8 +585,8 @@ Default value is `alpine`. We are currently using following os version: -- {data.alpine.default} -- {data.ubuntu.default} +- {data.alpine.default} +- {data.ubuntu.default} :::caution The os version is fixed and cannot be customised. @@ -663,16 +607,15 @@ Each port has following attributes: | port | Defines the port number. You can set any port number between _10_ and _65435_. Ports outside this interval are reserved for internal Zerops systems. | | protocol | **Optional.** Defines the protocol. Allowed values are `TCP` or `UDP`. Default value is `TCP`. | | httpSupport | **Optional.** `httpSupport = true` is the default setting for TCP protocol. Set `httpSupport = false` if a web server isn't running on the port. Zerops uses this information for the configuration of [public access](/features/access). `httpSupport = true` is available only in combination with the TCP protocol. | +| httpSupport | **Optional.** `httpSupport = true` is the default setting for TCP protocol. Set `httpSupport = false` if a web server isn't running on the port. Zerops uses this information for the configuration of [public access](/features/access). `httpSupport = true` is available only in combination with the TCP protocol. | ### prepareCommands _OPTIONAL._ Customises the Bun runtime environment by installing additional dependencies or tools to the runtime base environment. -

The base Bun environment contains {data.alpine.default} the selected - major version of Bun, Zerops command line tool and `npm`, `yarn`, `git` and `npx` tools. To install + major version of Bun, Zerops command line tool and `npm`, `yarn`, `git` and `npx` tools. To install additional packages or tools add one or more prepare commands: -

```yaml zerops: @@ -721,10 +664,8 @@ You can configure your prepare commands to be run in a single shell instance or ### Copy folders or files from your build container -

- The prepare runtime container contains {data.alpine.default}, the selected major version of Bun, Zerops command line tool and `npm`, + The prepare runtime container contains {data.alpine.default}, the selected major version of Bun, Zerops command line tool and `npm`, `yarn`, `git` and `npx` tools. -

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). @@ -847,6 +788,7 @@ Following attributes are available: | **path** | Defines the URL path of the HTTP GET request.
The readiness check will trigger a GET request on `http://127.0.0.1:{port}/{path}` | | **host** | **Optional.** The readiness check is triggered from inside of your runtime container so it always uses the localhost (`127.0.0.1`). If you need to add a `host` to the request header, specify it in the `host` attribute. | | **scheme** | **Optional.** The readiness check is triggered from inside of your runtime container so no https is required.
If your application requires a https request, set `scheme: https` | +| **scheme** | **Optional.** The readiness check is triggered from inside of your runtime container so no https is required.
If your application requires a https request, set `scheme: https` | **Example:** @@ -880,6 +822,7 @@ Following attributes are available: | Parameter | Description | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **command** | Defines a local command to be run.
The command has access to the same [environment variables](bun/how-to/create#set-secret-environment-variables) as your Bun application.
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below. | +| **command** | Defines a local command to be run.
The command has access to the same [environment variables](bun/how-to/create#set-secret-environment-variables) as your Bun application.
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below. | **Example:** @@ -948,6 +891,7 @@ Following attributes are available: | **path** | Defines the URL path of the HTTP GET request.
The readiness check will trigger a GET request on `http://127.0.0.1:{port}/{path}` | | **host** | **Optional.** The readiness check is triggered from inside of your runtime container so it always uses the localhost (`127.0.0.1`). If you need to add a `host` to the request header, specify it in the `host` attribute. | | **scheme** | **Optional.** The readiness check is triggered from inside of your runtime container so no https is required.
If your application requires a https request, set `scheme: https` | +| **scheme** | **Optional.** The readiness check is triggered from inside of your runtime container so no https is required.
If your application requires a https request, set `scheme: https` | **Example:** @@ -981,6 +925,7 @@ Following attributes are available: | Parameter | Description | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **command** | Defines a local command to be run.
The command has access to the same [environment variables](bun/how-to/create#set-secret-environment-variables) as your Bun application.
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below. | +| **command** | Defines a local command to be run.
The command has access to the same [environment variables](bun/how-to/create#set-secret-environment-variables) as your Bun application.
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below. | **Example:** @@ -1006,16 +951,10 @@ zerops: Read more about how the [readiness check works](bun/how-to/deploy-process#readiness-checks) in Zerops. +---------------------------------------- +# Bun > How To > Build Process -

- image -

## Description of the build process @@ -1039,15 +978,6 @@ The build container is automatically deleted after the build has finished or fai When you know that the running build is not correct and you want to cancel it, you can do it in Zerops GUI. Go to the service detail, open the list of running processes and click on the **Open pipeline detail** button. Then click on the **Cancel build** button. -

- image -

- :::caution The build cancellation is available before the build pipeline is finished. When the build is finished, the deployment cannot be cancelled. ::: @@ -1056,7 +986,7 @@ The build cancellation is available before the build pipeline is finished. When The default Bun build environment contains: -- {data.alpine.default} +- {data.alpine.default} - 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 @@ -1076,6 +1006,7 @@ Build of your Bun application is run in a separate build container with followin | **CPU cores** | 6 | 20 | | **RAM** | 8 GB | 8 GB | | **Disk** | 1 GB | 100 GB | +| **Disk** | 1 GB | 100 GB | The build container is always started with the minimum hardware resources and scales vertically up to the maximum resources. @@ -1116,6 +1047,10 @@ buildCommands: If the command ends successfully, it returns the exit code 0 and Zerops triggers the following command. When all `buildCommands` are finished, the application build is completed and ready for the [deploy](bun/how-to/deploy-process) phase. +---------------------------------------- + +# Bun > How To > Controls + Zerops allows you to stop any service. Stopped services only consume disk. @@ -1171,6 +1106,9 @@ zCLI commands are interactive, when you press enter after `zcli service start`, ::: +---------------------------------------- + +# Bun > How To > Create 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. @@ -1179,22 +1117,10 @@ Zerops provides a powerful Bun runtime service with extensive build support. The First, set up a project in the Zerops GUI. Then go to the project dashboard page and choose **Add new service** in the left menu under the **Services** section. From there, you can add a new Bun service: -