From 1ae02416b6055c90e5b4cf2f45bc9517323f12d4 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 2 Jul 2023 14:38:28 +0200 Subject: [PATCH] Fixes #419 --- docker-compose.yaml | 5 +++-- website/Install.md | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index a82cc6f5..8b46b173 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,8 +3,9 @@ services: image: zefhemel/silverbullet container_name: silverbullet restart: unless-stopped - ## To enable additional options, such as BasicAuth, uncomment the following line: - # command: ["--user=user:pw"] + ## To enable additional options, such as authentication, set environment variables, e.g. + #environment: + #- SB_USER=angel:1234 volumes: - space:/space ports: diff --git a/website/Install.md b/website/Install.md index aad22d9e..92323bb8 100644 --- a/website/Install.md +++ b/website/Install.md @@ -56,13 +56,13 @@ docker volume create myspace Then, run the container, e.g., as follows: ```shell -docker run -p 3000:3000 -v myspace:/space -d --name silverbullet zefhemel/silverbullet +docker run -p 3000:3000 -v myspace:/space -d zefhemel/silverbullet ``` -If you'd like to pass in additional command line arguments (e.g. `--user` to add authentication), you can just append those to the command, e.g.: +To configure various things such as authentication, use [[@env|environment variables]], e.g. to enable single-user auth: ```shell -docker run -p 3000:3000 -v myspace:/space -d --name silverbullet zefhemel/silverbullet --user me:letmein +docker run -p 3000:3000 -v myspace:/space -d -e SB_USER=me:letmein zefhemel/silverbullet ``` To build your own version of the docker image, run `./scripts/build_docker.sh`. @@ -106,6 +106,7 @@ $ sudo caddy reverse-proxy --to :3000 --from yourserver.yourtsdomain.ts.net:443 If you access SilverBullet via plain HTTP (outside of localhost) everything _should_ still mostly work, except offline mode. ## Environment variables +$env You can configure SB with environment variables instead of flags as well. The following environment variables are supported: * `SB_USER`: Sets single-user credentials (like `--user`), e.g. `SB_USER=pete:1234`