mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 13:23:03 +01:00
docs: improve documentation clarity
This commit is contained in:
@@ -1,24 +1,23 @@
|
|||||||
# Sablier - Scale to Zero
|
# Sablier - Scale to Zero
|
||||||
|
|
||||||
Sablier is a **free** and **open-source** software that can scale your workloads on demand.
|
Sablier is a **free** and **open-source** software that scales your workloads on demand.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Your workloads can be a docker container, a kubernetes deployment and more (see [providers](providers/overview) for the full list).
|
Your workloads can be a Docker container, a Kubernetes deployment, and more (see [providers](providers/overview) for the full list).
|
||||||
|
|
||||||
|
Sablier is an API that starts containers for a given duration.
|
||||||
|
|
||||||
Sablier is an API that start containers for a given duration.
|
It provides integrations with multiple reverse proxies and different loading strategies.
|
||||||
|
|
||||||
It provides an integrations with multiple reverse proxies and different loading strategies.
|
This allows you to start your containers on demand and shut them down automatically when there's no activity.
|
||||||
|
|
||||||
Which allows you to start your containers on demand and shut them down automatically as soon as there's no activity.
|
|
||||||
|
|
||||||
## Glossary
|
## Glossary
|
||||||
|
|
||||||
I'll use these terms in order to be provider-agnostic.
|
Throughout this documentation, we use these terms to remain provider-agnostic:
|
||||||
|
|
||||||
- **Session**: A Session is a set of **instances**
|
- **Session**: A session is a set of **instances**
|
||||||
- **Instance**: An instance is either a docker container, docker swarm service, kubernetes deployment or kubernetes statefulset
|
- **Instance**: An instance is either a Docker container, Docker Swarm service, Kubernetes deployment, or Kubernetes StatefulSet
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
There are three different ways to define configuration options in Sablier:
|
There are three ways to define configuration options in Sablier:
|
||||||
|
|
||||||
1. In a configuration file
|
1. In a configuration file
|
||||||
2. As environment variables
|
2. As environment variables
|
||||||
3. In the command-line arguments
|
3. As command-line arguments
|
||||||
|
|
||||||
These ways are evaluated in the order listed above.
|
These methods are evaluated in the order listed above, with later methods overriding earlier ones.
|
||||||
|
|
||||||
If no value was provided for a given option, a default value applies.
|
If no value is provided for a given option, a default value is used.
|
||||||
|
|
||||||
## Configuration File
|
## Configuration File
|
||||||
|
|
||||||
At startup, Sablier searches for configuration in a file named sablier.yml (or sablier.yaml) in:
|
At startup, Sablier searches for a configuration file named `sablier.yml` (or `sablier.yaml`) in the following locations:
|
||||||
|
|
||||||
- `/etc/sablier/`
|
- `/etc/sablier/`
|
||||||
- `$XDG_CONFIG_HOME/`
|
- `$XDG_CONFIG_HOME/`
|
||||||
- `$HOME/.config/`
|
- `$HOME/.config/`
|
||||||
- `.` *(the working directory).*
|
- `.` *(the working directory)*
|
||||||
|
|
||||||
You can override this using the configFile argument.
|
You can override this by using the `configFile` argument:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sablier --configFile=path/to/myconfigfile.yml
|
sablier --configFile=path/to/myconfigfile.yml
|
||||||
@@ -63,7 +63,9 @@ strategy:
|
|||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
All environment variables can be used in the form of the config file such as
|
All configuration options can be set as environment variables. The variable names follow the structure of the configuration file.
|
||||||
|
|
||||||
|
For example, this configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
strategy:
|
strategy:
|
||||||
@@ -71,7 +73,7 @@ strategy:
|
|||||||
custom-themes-path: /my/path
|
custom-themes-path: /my/path
|
||||||
```
|
```
|
||||||
|
|
||||||
Becomes
|
Becomes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
STRATEGY_DYNAMIC_CUSTOM_THEMES_PATH=/my/path
|
STRATEGY_DYNAMIC_CUSTOM_THEMES_PATH=/my/path
|
||||||
@@ -91,7 +93,9 @@ docker run sablierapp/sablier:1.10.1 --help
|
|||||||
```
|
```
|
||||||
<!-- x-release-please-end -->
|
<!-- x-release-please-end -->
|
||||||
|
|
||||||
All arguments can be used in the form of the config file such as
|
All configuration options can be used as command-line arguments. The argument names follow the structure of the configuration file.
|
||||||
|
|
||||||
|
For example, this configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
strategy:
|
strategy:
|
||||||
@@ -99,7 +103,7 @@ strategy:
|
|||||||
custom-themes-path: /my/path
|
custom-themes-path: /my/path
|
||||||
```
|
```
|
||||||
|
|
||||||
Becomes
|
Becomes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sablier start --strategy.dynamic.custom-themes-path /my/path
|
sablier start --strategy.dynamic.custom-themes-path /my/path
|
||||||
|
|||||||
@@ -1,33 +1,33 @@
|
|||||||
# Getting started
|
# Getting Started
|
||||||
|
|
||||||
This Getting Started will get you through what you need to understand how to use Sablier as a scale to zero middleware with a reverse proxy.
|
This guide will walk you through setting up Sablier as a scale-to-zero middleware with a reverse proxy.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Identify your provider
|
## Identify Your Provider
|
||||||
|
|
||||||
The first thing you need to do is to identify your [Provider](providers/overview).
|
The first thing you need to do is identify your [Provider](providers/overview).
|
||||||
|
|
||||||
?> A Provider is how Sablier can interact with your instances and scale them up and down to zero.
|
?> A Provider is how Sablier interacts with your instances to scale them up and down to zero.
|
||||||
|
|
||||||
You can check the available providers [here](providers/overview?id=available-providers).
|
You can check the available providers [here](providers/overview?id=available-providers).
|
||||||
|
|
||||||
## Identify your reverse proxy
|
## Identify Your Reverse Proxy
|
||||||
|
|
||||||
Once you've identified your [Provider](providers/overview), you'll want to identify your [Reverse Proxy](plugins/overview).
|
Once you've identified your [Provider](providers/overview), you'll need to identify your [Reverse Proxy](plugins/overview).
|
||||||
|
|
||||||
?> Because Sablier is designed as an API that can be used on its own, reverse proxy integrations acts as a client of that API.
|
?> Because Sablier is designed as an API that can be used independently, reverse proxy integrations act as clients of that API.
|
||||||
|
|
||||||
You can check the available reverse proxy plugins [here](plugins/overview?id=available-reverse-proxies)
|
You can check the available reverse proxy plugins [here](plugins/overview?id=available-reverse-proxies)
|
||||||
|
|
||||||
## Connect it all together
|
## Connect It All Together
|
||||||
|
|
||||||
- Let's say we're using the [Docker Provider](providers/docker).
|
- Let's say we're using the [Docker Provider](providers/docker).
|
||||||
- Let's say we're using the [Caddy Reverse Proxy Plugin](plugins/caddy).
|
- Let's say we're using the [Caddy Reverse Proxy Plugin](plugins/caddy).
|
||||||
|
|
||||||
### 1. Initial setup with Caddy
|
### 1. Initial Setup with Caddy
|
||||||
|
|
||||||
Suppose this is your initial setup with Caddy. You have your reverse proxy with a Caddyfile that does a simple reverse proxy on `/whoami`.
|
Suppose this is your initial setup with Caddy. You have your reverse proxy with a Caddyfile that performs a simple reverse proxy on `/whoami`.
|
||||||
|
|
||||||
<!-- tabs:start -->
|
<!-- tabs:start -->
|
||||||
|
|
||||||
@@ -58,12 +58,11 @@ services:
|
|||||||
|
|
||||||
<!-- tabs:end -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
At this point you can run `docker compose up` and go to `http://localhost:8080/whoami` and you will see your service.
|
Now you can run `docker compose up` and navigate to `http://localhost:8080/whoami` to see your service.
|
||||||
|
|
||||||
|
|
||||||
### 2. Install Sablier with the Docker Provider
|
### 2. Install Sablier with the Docker Provider
|
||||||
|
|
||||||
Add the Sablier container in the `docker-compose.yaml` file.
|
Add the Sablier container to the `docker-compose.yaml` file.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
@@ -88,9 +87,9 @@ services:
|
|||||||
|
|
||||||
### 3. Add the Sablier Caddy Plugin to Caddy
|
### 3. Add the Sablier Caddy Plugin to Caddy
|
||||||
|
|
||||||
Because Caddy does not provide any runtime evaluation for the plugins, we need to build Caddy with this specific plugin.
|
Because Caddy does not provide runtime plugin evaluation, we need to build Caddy with this specific plugin.
|
||||||
|
|
||||||
I'll use the provided Dockerfile to build the custom Caddy image.
|
We'll use the provided Dockerfile to build the custom Caddy image.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build https://github.com/sablierapp/sablier-caddy-plugin.git
|
docker build https://github.com/sablierapp/sablier-caddy-plugin.git
|
||||||
@@ -98,7 +97,7 @@ docker build https://github.com/sablierapp/sablier-caddy-plugin.git
|
|||||||
-t caddy:2.8.4-with-sablier
|
-t caddy:2.8.4-with-sablier
|
||||||
```
|
```
|
||||||
|
|
||||||
Then change the image to from `caddy:2.8.4` to `caddy:2.8.4-with-sablier`
|
Then change the image from `caddy:2.8.4` to `caddy:2.8.4-with-sablier`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
services:
|
services:
|
||||||
@@ -168,11 +167,11 @@ services:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Here we've configured the following things when we're accessing the service on `http://localhost:8080/whoami`:
|
Here we've configured the following for when accessing the service at `http://localhost:8080/whoami`:
|
||||||
- The containers that have the label `sablier.group=demo` will be started on demand
|
- Containers with the label `sablier.group=demo` will be started on demand
|
||||||
- The period of innactivity after which the containers should be shut down is one minute
|
- The period of inactivity after which containers should be shut down is one minute
|
||||||
- It uses the dynamic configuration and configures the title with `My Whoami Service`
|
- It uses the dynamic configuration and sets the display name to `My Whoami Service`
|
||||||
|
|
||||||
<!-- tabs:end -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
?> We've assigned the group `demo` to the service, and we use this to identify the workload.
|
?> We've assigned the group `demo` to the service, which is how we identify the workload.
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
## Sablier Healthcheck
|
## Sablier Healthcheck
|
||||||
|
|
||||||
### Using the `/health` route
|
### Using the `/health` Route
|
||||||
|
|
||||||
You can use the route `/health` to check for healthiness.
|
You can use the `/health` route to check for service health.
|
||||||
|
|
||||||
- Returns 200 `OK` when ready
|
- Returns 200 `OK` when ready
|
||||||
- Returns 503 `Service Unavailable` when terminating
|
- Returns 503 `Service Unavailable` when terminating
|
||||||
|
|
||||||
### Using the `sablier health` command
|
### Using the `sablier health` Command
|
||||||
|
|
||||||
You can use the command `sablier health` to check for healthiness.
|
You can use the `sablier health` command to check for service health.
|
||||||
|
|
||||||
`sablier health` takes on argument `--url` which defaults to `http://localhost:10000/health`.
|
The `sablier health` command takes one argument, `--url`, which defaults to `http://localhost:10000/health`.
|
||||||
|
|
||||||
<!-- x-release-please-start-version -->
|
<!-- x-release-please-start-version -->
|
||||||
```yml
|
```yml
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
# Install Sablier on its own
|
# Install Sablier
|
||||||
|
|
||||||
You can install Sablier with the following flavors:
|
You can install Sablier using one of the following methods:
|
||||||
|
|
||||||
- Use the Docker image
|
- Use the Docker image
|
||||||
- Use the binary distribution
|
- Use the binary distribution
|
||||||
- Compile your binary from the sources
|
- Compile from source
|
||||||
|
|
||||||
## Use the Docker image
|
## Use the Docker Image
|
||||||
|
|
||||||
- **Docker Hub**: [sablierapp/sablier](https://hub.docker.com/r/sablierapp/sablier)
|
- **Docker Hub**: [sablierapp/sablier](https://hub.docker.com/r/sablierapp/sablier)
|
||||||
- **GitHub Container Registry**: [ghcr.io/sablierapp/sablier](https://github.com/sablierapp/sablier/pkgs/container/sablier)
|
- **GitHub Container Registry**: [ghcr.io/sablierapp/sablier](https://github.com/sablierapp/sablier/pkgs/container/sablier)
|
||||||
|
|
||||||
Choose one of the Docker images and run it with one sample configuration file:
|
Choose one of the Docker images and run it with a sample configuration file:
|
||||||
|
|
||||||
- [sablier.yaml](https://raw.githubusercontent.com/sablierapp/sablier/main/sablier.sample.yaml)
|
- [sablier.yaml](https://raw.githubusercontent.com/sablierapp/sablier/main/sablier.sample.yaml)
|
||||||
|
|
||||||
@@ -22,22 +22,20 @@ docker run -d -p 10000:10000 \
|
|||||||
```
|
```
|
||||||
<!-- x-release-please-end -->
|
<!-- x-release-please-end -->
|
||||||
|
|
||||||
## Use the binary distribution
|
## Use the Binary Distribution
|
||||||
|
|
||||||
Grab the latest binary from the [releases](https://github.com/sablierapp/sablier/releases) page.
|
Download the latest binary from the [releases](https://github.com/sablierapp/sablier/releases) page and run it:
|
||||||
|
|
||||||
And run it:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./sablier --help
|
./sablier --help
|
||||||
```
|
```
|
||||||
|
|
||||||
## Compile your binary from the sources
|
## Compile from Source
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com:sablierapp/sablier.git
|
git clone git@github.com:sablierapp/sablier.git
|
||||||
cd sablier
|
cd sablier
|
||||||
make
|
make
|
||||||
# Output will change depending on your distro
|
# Output will vary depending on your platform
|
||||||
./sablier_draft_linux-amd64
|
./sablier_draft_linux-amd64
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# Reverse Proxy Plugins
|
# Reverse Proxy Plugins
|
||||||
|
|
||||||
## What is a Reverse Proxy Plugin ?
|
## What is a Reverse Proxy Plugin?
|
||||||
|
|
||||||
Reverse proxy plugins are the integration with a reverse proxy.
|
Reverse proxy plugins provide integration with a reverse proxy.
|
||||||
|
|
||||||
?> Because Sablier is designed as an API that can be used on its own, reverse proxy integrations acts as a client of that API.
|
?> Because Sablier is designed as an API that can be used independently, reverse proxy integrations act as clients of that API.
|
||||||
|
|
||||||
It leverages the API calls to plugin integration to catch in-flight requests to Sablier.
|
They leverage API calls to intercept in-flight requests and communicate with Sablier.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -32,8 +32,8 @@ It leverages the API calls to plugin integration to catch in-flight requests to
|
|||||||
|
|
||||||
*Your Reverse Proxy is not on the list? [Open an issue to request the missing reverse proxy integration here!](https://github.com/sablierapp/sablier/issues/new?assignees=&labels=enhancement%2C+reverse-proxy&projects=&template=reverse-proxy-integration-request.md&title=Add+%60%5BREVERSE+PROXY%5D%60+reverse+proxy+integration)*
|
*Your Reverse Proxy is not on the list? [Open an issue to request the missing reverse proxy integration here!](https://github.com/sablierapp/sablier/issues/new?assignees=&labels=enhancement%2C+reverse-proxy&projects=&template=reverse-proxy-integration-request.md&title=Add+%60%5BREVERSE+PROXY%5D%60+reverse+proxy+integration)*
|
||||||
|
|
||||||
## Runtime and Compiled plugins
|
## Runtime and Compiled Plugins
|
||||||
|
|
||||||
Some reverse proxies have the capability to evaluate the plugins at runtime (Traefik with Yaegi, NGINX with Lua and JS plugins) which means the reverse proxy provides a way to consume the plugin directly.
|
Some reverse proxies can evaluate plugins at runtime (e.g., Traefik with Yaegi, NGINX with Lua and JavaScript plugins), which means the reverse proxy can consume the plugin directly without recompilation.
|
||||||
|
|
||||||
Some others enforce you to rebuild your reverse proxy (Caddy).
|
Others require you to rebuild your reverse proxy with the plugin included (e.g., Caddy).
|
||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
## What is a Provider?
|
## What is a Provider?
|
||||||
|
|
||||||
A Provider is how Sablier can interact with your instances.
|
A Provider is how Sablier interacts with your instances.
|
||||||
|
|
||||||
A Provider typically have the following capabilities:
|
A Provider typically has the following capabilities:
|
||||||
- Start an instance
|
- Start an instance
|
||||||
- Stop an instance
|
- Stop an instance
|
||||||
- Get the current status of an instance
|
- Get the current status of an instance
|
||||||
- Listen for instance lifecycle events (started, stopped)
|
- Listen for instance lifecycle events (started, stopped)
|
||||||
|
|
||||||
## Available providers
|
## Available Providers
|
||||||
|
|
||||||
| Provider | Name | Details |
|
| Provider | Name | Details |
|
||||||
|------------------------------|---------------------------|------------------------------------------------------------------|
|
|------------------------------|---------------------------|------------------------------------------------------------------|
|
||||||
@@ -21,4 +21,4 @@ A Provider typically have the following capabilities:
|
|||||||
|
|
||||||
*Your Provider is not on the list? [Open an issue to request the missing provider here!](https://github.com/sablierapp/sablier/issues/new?assignees=&labels=enhancement%2C+provider&projects=&template=instance-provider-request.md&title=Add+%60%5BPROVIDER%5D%60+provider)*
|
*Your Provider is not on the list? [Open an issue to request the missing provider here!](https://github.com/sablierapp/sablier/issues/new?assignees=&labels=enhancement%2C+provider&projects=&template=instance-provider-request.md&title=Add+%60%5BPROVIDER%5D%60+provider)*
|
||||||
|
|
||||||
[See the active issues about the providers](https://github.com/sablierapp/sablier/issues?q=is%3Aopen+is%3Aissue+label%3Aprovider)
|
[See the active issues about providers](https://github.com/sablierapp/sablier/issues?q=is%3Aopen+is%3Aissue+label%3Aprovider)
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
## Dynamic Strategy
|
## Dynamic Strategy
|
||||||
|
|
||||||
The **Dynamic Strategy** provides a waiting page for your session.
|
The **Dynamic Strategy** displays a waiting page while your session starts.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
?> This strategy is well suited for a user that would access a frontend directly and expects to see a loading page.
|
?> This strategy is ideal for users accessing a frontend directly, as they'll see a loading page while their services start.
|
||||||
|
|
||||||
```plantuml
|
```plantuml
|
||||||
@startuml
|
@startuml
|
||||||
@@ -37,9 +37,9 @@ User <-- Proxy: Content
|
|||||||
```
|
```
|
||||||
## Blocking Strategy
|
## Blocking Strategy
|
||||||
|
|
||||||
The **Blocking Strategy** hangs the request until your session is ready.
|
The **Blocking Strategy** holds the request until your session is ready.
|
||||||
|
|
||||||
?> This strategy is well suited for an API communication.
|
?> This strategy is ideal for API communication, where clients expect to wait for a response.
|
||||||
|
|
||||||
```plantuml
|
```plantuml
|
||||||
@startuml
|
@startuml
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Themes
|
# Themes
|
||||||
|
|
||||||
Sablier comes with a set of default theme that you can use.
|
Sablier comes with a set of default themes that you can use.
|
||||||
|
|
||||||
You can also extend the themes by providing your own and they will be templated as Go Templates.
|
You can also extend the themes by providing your own, which will be rendered as Go Templates.
|
||||||
|
|
||||||
## The embedded themes
|
## The Embedded Themes
|
||||||
|
|
||||||
|
|
||||||
| Name | Preview |
|
| Name | Preview |
|
||||||
@@ -16,9 +16,9 @@ You can also extend the themes by providing your own and they will be templated
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Custom themes locations
|
## Custom Themes Locations
|
||||||
|
|
||||||
You can use the argument `--strategy.dynamic.custom-themes` to define the location to search upon starting.
|
You can use the `--strategy.dynamic.custom-themes` argument to define the location where Sablier should search for themes at startup.
|
||||||
|
|
||||||
By default, the docker image looks for themes located inside the `/etc/sablier/themes` folder.
|
By default, the docker image looks for themes located inside the `/etc/sablier/themes` folder.
|
||||||
|
|
||||||
@@ -33,12 +33,12 @@ services:
|
|||||||
```
|
```
|
||||||
<!-- x-release-please-end -->
|
<!-- x-release-please-end -->
|
||||||
|
|
||||||
It will look recursively for themes with the `.html` extension.
|
Sablier will recursively search for themes with the `.html` extension.
|
||||||
|
|
||||||
- You **cannot** load new themes added in the folder without restarting
|
- You **cannot** load new themes added to the folder without restarting
|
||||||
- You **can** modify the existing themes files
|
- You **can** modify existing theme files without restarting
|
||||||
|
|
||||||
## Create a custom theme
|
## Create a Custom Theme
|
||||||
|
|
||||||
Themes are served using [Go Templates](https://pkg.go.dev/text/template).
|
Themes are served using [Go Templates](https://pkg.go.dev/text/template).
|
||||||
|
|
||||||
@@ -59,11 +59,11 @@ Themes are served using [Go Templates](https://pkg.go.dev/text/template).
|
|||||||
|
|
||||||
### The `<meta http-equiv="refresh" />` tag
|
### The `<meta http-equiv="refresh" />` tag
|
||||||
|
|
||||||
The auto refresh is done using the [HTML <meta> http-equiv Attribute](https://www.w3schools.com/tags/att_meta_http_equiv.asp).
|
The auto-refresh is accomplished using the [HTML <meta> http-equiv Attribute](https://www.w3schools.com/tags/att_meta_http_equiv.asp).
|
||||||
|
|
||||||
> Defines a time interval for the document to refresh itself.
|
> Defines a time interval for the document to refresh itself.
|
||||||
|
|
||||||
So the first step to create your own theme is to include the `HTML <meta> http-equiv Attribute` as follows:
|
The first step to creating your own theme is to include the `HTML <meta> http-equiv Attribute` as follows:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<head>
|
<head>
|
||||||
@@ -73,13 +73,13 @@ So the first step to create your own theme is to include the `HTML <meta> http-e
|
|||||||
</head>
|
</head>
|
||||||
```
|
```
|
||||||
|
|
||||||
## The `showDetails` option
|
## The `showDetails` Option
|
||||||
|
|
||||||
If `showDetails` is set to `false` then the `.InstanceStates` will be an empty array.
|
If `showDetails` is set to `false`, the `.InstanceStates` will be an empty array.
|
||||||
|
|
||||||
## How to load my custom theme
|
## How to Load Your Custom Theme
|
||||||
|
|
||||||
You can load themes by specifying their name and their relative path from the `--strategy.dynamic.custom-themes-path` value.
|
You can load themes by specifying their name and relative path from the `--strategy.dynamic.custom-themes-path` value.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
/my/custom/themes/
|
/my/custom/themes/
|
||||||
@@ -89,13 +89,13 @@ You can load themes by specifying their name and their relative path from the `-
|
|||||||
└── secret.html # special/secret
|
└── secret.html # special/secret
|
||||||
```
|
```
|
||||||
|
|
||||||
Such as
|
For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl 'http://localhost:10000/api/strategies/dynamic?session_duration=1m&names=nginx&theme=custom1'
|
curl 'http://localhost:10000/api/strategies/dynamic?session_duration=1m&names=nginx&theme=custom1'
|
||||||
```
|
```
|
||||||
|
|
||||||
## See the available themes from the API
|
## See the Available Themes from the API
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl 'http://localhost:10000/api/strategies/dynamic/themes'
|
curl 'http://localhost:10000/api/strategies/dynamic/themes'
|
||||||
|
|||||||
Reference in New Issue
Block a user