diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 97d03e5..33cc23e 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -4,7 +4,6 @@ - [Configuration](/configuration) - [Strategies](/strategies) - [Themes](/themes) -- [FAQ](/faq) - [Versioning](/versioning) - **Providers** - [Overview](/providers/overview) diff --git a/docs/api/README.md b/docs/api/README.md deleted file mode 100644 index bb18fe9..0000000 --- a/docs/api/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Documentation for Sablier - - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:10000* - -| Class | Method | HTTP request | Description | -|------------ | ------------- | ------------- | -------------| -| *ScaleApi* | [**scaleBlocking**](Apis/ScaleApi.md#scaleblocking) | **GET** /api/strategies/blocking | Hangs the request until the services are ready | -*ScaleApi* | [**scaleDynamic**](Apis/ScaleApi.md#scaledynamic) | **GET** /api/strategies/dynamic | The waiting page for the given services | -| *ThemeApi* | [**getTheme**](Apis/ThemeApi.md#gettheme) | **GET** /api/strategies/dynamoc/themes | | - - - -## Documentation for Models - - - [instance](./Models/instance.md) - - [session](./Models/session.md) - - [status](./Models/status.md) - - [themes](./Models/themes.md) - - - -## Documentation for Authorization - -All endpoints do not require authorization. - -## API - -To run the following examples you can create two containers: - -- `docker create --name nginx nginx` -- `docker create --name apache httpd` - -### GET `/api/strategies/dynamic` - -**Description**: The `/api/strategies/dynamic` endpoint allows you to request a waiting page for multiple instances - -| Parameter | Value | Description | -| -------------------------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `names` | array of string | The instances to be started (cannot be used with `group` parameter) | -| `group` | string | The instance group to be started (using `sablier.group=mygroup` labels) (cannot be used with `names` parameter) | -| `session_duration` | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The session duration for all services, which will reset at each subsequent calls | -| `show_details` *(optional)* | bool | The details about instances | -| `display_name` *(optional)* | string | The display name | -| `theme` *(optional)* | string | The theme to use | -| `refresh_frequency` *(optional)* | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The refresh frequency for the loading page | - -Go to http://localhost:10000/api/strategies/dynamic?names=nginx&names=apache&session_duration=5m&show_details=true&display_name=example&theme=hacker-terminal&refresh_frequency=10s and you should see - -A special header `X-Sablier-Session-Status` is returned and will have the value `ready` if all instances are ready. Or else `not-ready`. - -![API Dynamic Prompt image](docs/img/api-dynamic.png) - -### GET `/api/strategies/blocking` - -**Description**: The `/api/strategies/blocking` endpoint allows you to wait until the instances are ready - -| Parameter | Value | Description | -| ---------------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `names` | array of string | The instances to be started (cannot be used with `group` parameter) | -| `group` | string | The instance group to be started (using `sablier.group=mygroup` labels) (cannot be used with `names` parameter) | -| `session_duration` | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The session duration for all services, which will reset at each subsequent calls | -| `timeout` *(optional)* | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The maximum time to wait for instances to be ready | - -A special header `X-Sablier-Session-Status` is returned and will have the value `ready` if all instances are ready. Or else `not-ready`. - -**Curl example** -```bash -curl -X GET -v "http://localhost:10000/api/strategies/blocking?names=nginx&names=apache&session_duration=5m&timeout=5s" -* Trying 127.0.0.1:10000... -* Connected to localhost (127.0.0.1) port 10000 (#0) -> GET /api/strategies/blocking?names=nginx&names=apache&session_duration=5m&timeout=30s HTTP/1.1 -> Host: localhost:10000 -> User-Agent: curl/7.74.0 -> Accept: */* -> -* Mark bundle as not supporting multiuse -< HTTP/1.1 200 OK -< Content-Type: application/json; charset=utf-8 -< X-Sablier-Session-Status: ready -< Date: Mon, 14 Nov 2022 19:20:50 GMT -< Content-Length: 245 -< -{"session": - {"instances": - [ - {"instance":{"name":"nginx","currentReplicas":1,"desiredReplicas":1,"status":"ready"},"error":null}, - {"instance":{"name":"apache","currentReplicas":1,"desiredReplicas":1,"status":"ready"},"error":null} - ], - "status":"ready" - } -} -``` \ No newline at end of file diff --git a/docs/assets/img/favicon.ico b/docs/assets/img/favicon.ico index 0f8f98b..b7e5c34 100644 Binary files a/docs/assets/img/favicon.ico and b/docs/assets/img/favicon.ico differ diff --git a/docs/faq.md b/docs/faq.md deleted file mode 100644 index 5ca5fdc..0000000 --- a/docs/faq.md +++ /dev/null @@ -1,3 +0,0 @@ -# Frequenty Asked Questions - -This page is still under construction. Feel free to contribute by raising an issue about a specific cqustion, or by adding a question and an answer about something which is frequently asked in the issues. \ No newline at end of file diff --git a/docs/getting-started.md b/docs/getting-started.md index c388c2f..51d8b2d 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -36,7 +36,7 @@ Suppose this is your initial setup with Caddy. You have your reverse proxy with ```yaml services: proxy: - image: caddy:2.6.4 + image: caddy:2.8.4 ports: - "8080:80" volumes: @@ -68,7 +68,7 @@ Add the Sablier container in the `docker-compose.yaml` file. ```yaml services: proxy: - image: caddy:2.6.4 + image: caddy:2.8.4 ports: - "8080:80" volumes: @@ -93,17 +93,17 @@ Because Caddy does not provide any runtime evaluation for the plugins, we need t I'll use the provided Dockerfile to build the custom Caddy image. ```bash -docker build https://github.com/sablierapp/sablier.git#v1.4.0-beta.3:plugins/caddy - --build-arg=CADDY_VERSION=2.6.4 - -t caddy:2.6.4-with-sablier +docker build https://github.com/sablierapp/sablier.git#v1.8.1:plugins/caddy + --build-arg=CADDY_VERSION=2.8.4 + -t caddy:2.8.4-with-sablier ``` -Then change the image to from `caddy:2.6.4` to `caddy:2.6.4-with-sablier` +Then change the image to from `caddy:2.8.4` to `caddy:2.8.4-with-sablier` ```yaml services: proxy: - image: caddy:2.6.4-with-sablier + image: caddy:2.8.4-with-sablier ports: - "8080:80" volumes: @@ -123,7 +123,7 @@ services: ### 4. Configure Caddy to use the Sablier Caddy Plugin on the `whoami` service -This is how you opt-in your services and link them with the plugin. +This is how you opt in your services and link them with the plugin. @@ -145,7 +145,7 @@ services: - sablier.group=demo sablier: - image: sablierapp/sablier:local + image: sablierapp/sablier:1.8.1 volumes: - '/var/run/docker.sock:/var/run/docker.sock' ``` @@ -175,4 +175,4 @@ Here we've configured the following things when we're accessing the service on ` -?> We've assigned the group `demo` to the service and we use this to identify the workload i \ No newline at end of file +?> We've assigned the group `demo` to the service, and we use this to identify the workload i \ No newline at end of file diff --git a/docs/guides/code-server-traefik-kubernetes.md b/docs/guides/code-server-traefik-kubernetes.md index 24ac65d..c67055a 100644 --- a/docs/guides/code-server-traefik-kubernetes.md +++ b/docs/guides/code-server-traefik-kubernetes.md @@ -140,7 +140,6 @@ app: sablier spec: serviceAccountName: sablier - serviceAccount: sablier containers: - name: sablier image: sablierapp/sablier:1.8.1 diff --git a/docs/index.html b/docs/index.html index 1194f51..a7995ce 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,7 +7,6 @@ -