From 10d606f8e9fffe2bda183d44f48413f4c0f44f96 Mon Sep 17 00:00:00 2001 From: dswbx Date: Tue, 10 Dec 2024 09:57:05 +0100 Subject: [PATCH] docs: added docker instructions --- docker/README.md | 9 ++------ docs/integration/docker.mdx | 45 +++++++++++++++++++++++++++++++++++++ docs/introduction.mdx | 17 ++++++++++++++ docs/mint.json | 4 ++-- 4 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 docs/integration/docker.mdx diff --git a/docker/README.md b/docker/README.md index 48e498e..8c514b0 100644 --- a/docker/README.md +++ b/docker/README.md @@ -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 diff --git a/docs/integration/docker.mdx b/docs/integration/docker.mdx new file mode 100644 index 0000000..5a71f2c --- /dev/null +++ b/docs/integration/docker.mdx @@ -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://.turso.io --db-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 +``` \ No newline at end of file diff --git a/docs/introduction.mdx b/docs/introduction.mdx index d456f2b..fe65e6a 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -73,4 +73,21 @@ in the future, so stay tuned! } href="/integration/bun" /> + + + + + } + href="/integration/node" + /> + + + } + href="/integration/docker" + /> diff --git a/docs/mint.json b/docs/mint.json index ac740cb..5be4fbe 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -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"]