-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update self-hosted API Docker command example
- Loading branch information
Showing
1 changed file
with
4 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 `<email>=<token>`, where `<email>` 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 [email protected]=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 `[email protected]` 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, | ||
|