From 8d3da0f0ec6d74680f2f9adc20d1a86e29f60c13 Mon Sep 17 00:00:00 2001 From: Matthieu Monsch Date: Sun, 1 Dec 2024 07:53:52 -0800 Subject: [PATCH] docs: update self-hosted API Docker command example --- .../using-a-self-hosted-api-server.ipynb | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/resources/guides/using-a-self-hosted-api-server.ipynb b/resources/guides/using-a-self-hosted-api-server.ipynb index 33a2e43..511e3cf 100644 --- a/resources/guides/using-a-self-hosted-api-server.ipynb +++ b/resources/guides/using-a-self-hosted-api-server.ipynb @@ -26,14 +26,10 @@ "\n", "### From the Docker image\n", "\n", - "Alternatively, you can download and run the [`opvious/api-server`](https://hub.docker.com/r/opvious/api-server) Docker image directly. This allows you to use it with your own database and/or cache:\n", + "Alternatively, you can download and run the [`opvious/api-server`](https://hub.docker.com/r/opvious/api-server) Docker image directly:\n", "\n", "```\n", - "docker run -p 8080:8080 \\\n", - " -e DB_URL=postgres:// \\\n", - " -e REDIS_URL=redis:// \\\n", - " -e OPVIOUS_API_IMAGE_EULA \\\n", - " opvious/api-server\n", + "docker run -p 8080:8080 opvious/api-server\n", "```\n", "\n", "Refer to the image's documentation for more information.\n", @@ -55,18 +51,7 @@ "profiles:\n", " - name: local\n", " endpoint: http://localhost:8080\n", - "```\n", - "\n", - "\n", - "## Authenticating requests\n", - "\n", - "The server's `STATIC_TOKENS` environment variable is used to specify a comma-separated list of static API tokens for authenticating API requests. Each entry's format is `=`, where `` is the associated account's email. When using the CLI, this variable is set with the `-t` option:\n", - "\n", - "```sh\n", - "opvious api start -t user@example.com=secret-token\n", - "```\n", - "\n", - "These tokens can then be used as regular API tokens in SDKs by prefixing them with `static:`. For example requests to the server started with the command just above can be authenticated as `user@example.com` by setting `OPVIOUS_TOKEN=static:secret-token`." + "```" ] }, { @@ -94,7 +79,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.5" + "version": "3.12.7" } }, "nbformat": 4,