mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
docs: added docker instructions
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# Official `bknd` Docker image
|
||||
The docker image intentially doesn't copy any data into the image for now, so you can copy the
|
||||
Dockerfile and build the image anywhere.
|
||||
The docker image intentially doesn't copy any data into the image for now, so you can copy the Dockerfile and build the image anywhere.
|
||||
|
||||
## Building the Docker image
|
||||
To build the Docker image, run the following command:
|
||||
@@ -16,11 +15,7 @@ To run the Docker container, run the following command:
|
||||
docker run -p 1337:1337 bknd
|
||||
```
|
||||
|
||||
You can pass the same CLI arguments (see [Using the CLI](https://docs.bknd.io/cli) guide) to the
|
||||
docker container as you'd do with
|
||||
`npx bknd
|
||||
run`,
|
||||
like so:
|
||||
You can pass the same CLI arguments (see [Using the CLI](https://docs.bknd.io/cli) guide) to the docker container as you'd do with `npx bknd run`, like so:
|
||||
|
||||
```bash
|
||||
docker run -p 1337:1337 -e ARGS="--db-url file:/data/data.db" bknd
|
||||
|
||||
45
docs/integration/docker.mdx
Normal file
45
docs/integration/docker.mdx
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: 'Docker'
|
||||
description: 'Official docker image for bknd'
|
||||
---
|
||||
|
||||
# Official `bknd` Docker image
|
||||
The docker image intentially doesn't copy any data into the image for now, so you can copy the
|
||||
Dockerfile and build the image anywhere.
|
||||
|
||||
Locate the Dockerfile either by pulling the [repository](https://github.com/bknd-io/bknd) and navigating to the `docker`
|
||||
directory,
|
||||
or download from [here](https://github.com/bknd-io/bknd/blob/main/docker/Dockerfile).
|
||||
|
||||
## Building the Docker image
|
||||
To build the Docker image, run the following command:
|
||||
|
||||
```bash
|
||||
docker build -t bknd .
|
||||
```
|
||||
|
||||
## Running the Docker container
|
||||
To run the Docker container, run the following command:
|
||||
|
||||
```bash
|
||||
docker run -p 1337:1337 bknd
|
||||
```
|
||||
|
||||
You can pass the same CLI arguments (see [Using the CLI](https://docs.bknd.io/cli) guide) to the
|
||||
docker container as you'd do with
|
||||
`npx bknd
|
||||
run`,
|
||||
like so:
|
||||
|
||||
```bash
|
||||
docker run -p 1337:1337 -e ARGS="--db-url file:/data/data.db" bknd
|
||||
```
|
||||
Or connect to a remote turso database:
|
||||
```bash
|
||||
docker run -p 1337:1337 -e ARGS="--db-url libsql://<db>.turso.io --db-token <token>" bknd
|
||||
```
|
||||
|
||||
To mount the data directory to the host, you can use the `-v` flag:
|
||||
```bash
|
||||
docker run -p 1337:1337 -v /path/to/data:/data bknd
|
||||
```
|
||||
@@ -73,4 +73,21 @@ in the future, so stay tuned!
|
||||
</div>}
|
||||
href="/integration/bun"
|
||||
/>
|
||||
<Card
|
||||
title="Node"
|
||||
icon={<div className="text-primary-light">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width={24} height={24} viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M12 23.956c-.342 0-.66-.089-.957-.243l-3.029-1.738c-.455-.242-.227-.33-.09-.374c.614-.198.728-.242 1.366-.595c.068-.044.16-.022.228.022l2.323 1.343c.09.044.205.044.273 0l9.087-5.084c.09-.044.136-.132.136-.242V6.899c0-.11-.045-.198-.136-.242l-9.087-5.061c-.091-.044-.205-.044-.273 0L2.754 6.657c-.091.044-.137.154-.137.242v10.146c0 .088.046.198.137.242l2.482 1.387c1.344.66 2.186-.11 2.186-.88V7.78c0-.132.114-.264.274-.264h1.161c.137 0 .273.11.273.264v10.013c0 1.739-.979 2.751-2.687 2.751c-.524 0-.934 0-2.095-.55l-2.391-1.32A1.85 1.85 0 0 1 1 17.067V6.921c0-.66.364-1.276.957-1.606L11.044.23a2.1 2.1 0 0 1 1.912 0l9.088 5.084c.592.33.956.946.956 1.606v10.146c0 .66-.364 1.276-.956 1.607l-9.087 5.083a2.4 2.4 0 0 1-.957.198m2.801-6.977c-3.985 0-4.805-1.76-4.805-3.257c0-.132.114-.264.273-.264h1.184c.137 0 .25.088.25.22c.183 1.166.707 1.738 3.121 1.738c1.913 0 2.733-.418 2.733-1.408c0-.572-.228-.99-3.211-1.276c-2.483-.243-4.031-.77-4.031-2.685c0-1.783 1.548-2.84 4.145-2.84c2.915 0 4.35.969 4.532 3.082a.35.35 0 0 1-.069.198c-.045.044-.113.088-.182.088h-1.184a.265.265 0 0 1-.25-.198c-.274-1.21-.98-1.607-2.847-1.607c-2.096 0-2.346.704-2.346 1.233c0 .638.296.836 3.12 1.188c2.801.352 4.122.858 4.122 2.75c-.023 1.938-1.662 3.038-4.555 3.038"></path>
|
||||
</svg>
|
||||
</div>}
|
||||
href="/integration/node"
|
||||
/>
|
||||
<Card
|
||||
title="Docker"
|
||||
icon={<div className="text-primary-light">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width={30} height={30} viewBox="0 0 24 24"><path
|
||||
fill="currentColor" d="M21.81 10.25c-.06-.04-.56-.43-1.64-.43c-.28 0-.56.03-.84.08c-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17l-.18.27c-.24.36-.43.77-.51 1.19c-.2.8-.08 1.56.33 2.21c-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63c0 1.15.18 2.3.58 3.38c.45 1.19 1.13 2.07 2 2.61c.98.6 2.59.94 4.42.94c.79 0 1.61-.07 2.42-.22c1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85c.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16"></path></svg>
|
||||
</div>}
|
||||
href="/integration/docker"
|
||||
/>
|
||||
</CardGroup>
|
||||
|
||||
@@ -106,7 +106,8 @@
|
||||
"integration/astro",
|
||||
"integration/node",
|
||||
"integration/deno",
|
||||
"integration/browser"
|
||||
"integration/browser",
|
||||
"integration/docker"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -156,7 +157,6 @@
|
||||
"guide/media/transformations"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"group": "API Documentation",
|
||||
"pages": ["api-reference/introduction"]
|
||||
|
||||
Reference in New Issue
Block a user