parent
5cc7b47d6a
commit
a268ea89f2
|
@ -1,13 +1,13 @@
|
|||
FROM denoland/deno:debian-2.2.0
|
||||
FROM denoland/deno:debian-2.2.1
|
||||
|
||||
# The volume that will keep the space data
|
||||
|
||||
# Either create a volume:
|
||||
# docker volume create myspace
|
||||
# Then bind-mount it when running the container with the -v flag, e.g.:
|
||||
# docker run -v myspace:/space -p3000:3000 -it zefhemel/silverbullet
|
||||
# docker run -v myspace:/space -p3000:3000 -it ghcr.io/silverbulletmd/silverbullet
|
||||
# Or simply mount an existing folder into the container:
|
||||
# docker run -v /path/to/my/folder:/space -p3000:3000 -it zefhemel/silverbullet
|
||||
# docker run -v /path/to/my/folder:/space -p3000:3000 -it ghcr.io/silverbulletmd/silverbullet
|
||||
|
||||
VOLUME /space
|
||||
|
||||
|
@ -53,5 +53,5 @@ RUN deno cache /silverbullet.js
|
|||
ADD ./docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
# Run the server, allowing to pass in additional argument at run time, e.g.
|
||||
# docker run -p 3002:3000 -v myspace:/space -it zefhemel/silverbullet --user me:letmein
|
||||
# docker run -p 3002:3000 -v myspace:/space -it ghcr.io/silverbulletmd/silverbullet --user me:letmein
|
||||
ENTRYPOINT ["/tini", "--", "/docker-entrypoint.sh"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
deno task bundle
|
||||
docker build -t zefhemel/silverbullet .
|
||||
docker build -t silverbullet .
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cd $(realpath $(dirname $(dirname $0)))
|
||||
|
||||
IMAGE_NAME="zefhemel/silverbullet:edge"
|
||||
IMAGE_NAME="ghcr.io/silverbulletmd/silverbullet:edge"
|
||||
WEBSITE_SPACE="./website"
|
||||
WEBSITE_PORT=3000
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Introduction
|
||||
[Docker](https://www.docker.com/) is a convenient and secure way to install server applications either locally or on a server you control. If you don’t have docker already running on your machine and are macOS user, consider giving [OrbStack](https://orbstack.dev/) a try — it’s a super nice docker experience.
|
||||
|
||||
Conveniently, SilverBullet is published as a [docker image on docker hub](https://hub.docker.com/r/zefhemel/silverbullet). The image comes in two flavors:
|
||||
Conveniently, SilverBullet is published as a [docker image on GHCR](https://github.com/silverbulletmd/silverbullet/pkgs/container/silverbullet). The image comes in two flavors:
|
||||
|
||||
* 64-bit Intel
|
||||
* 64-bit ARM (e.g. for Raspberry Pis and Apple Silicon macs)
|
||||
|
@ -20,7 +20,7 @@ For your first run, you can run the following:
|
|||
# Create a local folder "space" to keep files in
|
||||
mkdir -p space
|
||||
# Run the SilverBullet docker container in the foreground
|
||||
sudo docker run -it -p 3000:3000 -v ./space:/space zefhemel/silverbullet
|
||||
sudo docker run -it -p 3000:3000 -v ./space:/space ghcr.io/silverbulletmd/silverbullet
|
||||
```
|
||||
|
||||
This will run SilverBullet in the foreground, interactively, so you can see the logs and instructions.
|
||||
|
@ -30,7 +30,7 @@ If this all works fine, just kill the thing with `Ctrl-c` (don’t worry, it’s
|
|||
Now you probably want to run the container in daemon (background) mode, give it a name, and automatically have it restart after you e.g. reboot your machine:
|
||||
|
||||
```shell
|
||||
docker run -d --restart unless-stopped --name silverbullet -p 3000:3000 -v ./space:/space zefhemel/silverbullet
|
||||
docker run -d --restart unless-stopped --name silverbullet -p 3000:3000 -v ./space:/space ghcr.io/silverbulletmd/silverbullet
|
||||
```
|
||||
|
||||
There you go!
|
||||
|
@ -38,20 +38,20 @@ There you go!
|
|||
Note that to get offline mode to work you need to serve SilverBullet with HTTPS, via for example a reverse proxy.
|
||||
|
||||
# Versions
|
||||
The `zefhemel/silverbullet` image will give you the latest released version. This is equivalent to `zefhemel/silverbullet:latest`. If you prefer, you can also pin to a specific release, e.g. `zefhemel/silverbullet:0.6.0`. If you prefer to live on the bleeding edge, you can use the `zefhemel/silverbullet:edge` image, which is updated on every commit to the `main` brain. This is the YOLO option.
|
||||
The `ghcr.io/silverbulletmd/silverbullet` image will give you the latest released version. This is equivalent to `ghcr.io/silverbulletmd/silverbullet:latest`. If you prefer, you can also pin to a specific release, e.g. `ghcr.io/silverbulletmd/silverbullet:0.10.1`. If you prefer to live on the bleeding edge, you can use the `ghcr.io/silverbulletmd/silverbullet:edge` image, which is updated on every commit to the `main` brain. This is the YOLO option.
|
||||
|
||||
## Upgrade
|
||||
You can upgrade SilverBullet as follows:
|
||||
|
||||
```shell
|
||||
# Pull the latest version of the image
|
||||
docker pull zefhemel/silverbullet
|
||||
docker pull ghcr.io/silverbulletmd/silverbullet
|
||||
# Kill the running container
|
||||
docker kill silverbullet
|
||||
# Remove the old container
|
||||
docker rm silverbullet
|
||||
# Start a fresh one (same command as before)
|
||||
docker run -d --restart unless-stopped --name silverbullet -p 3000:3000 -v $PWD/space:/space zefhemel/silverbullet
|
||||
docker run -d --restart unless-stopped --name silverbullet -p 3000:3000 -v $PWD/space:/space ghcr.io/silverbulletmd/silverbullet
|
||||
```
|
||||
|
||||
Since this is somewhat burdensome, it is recommended you use a tool like [watchtower](https://github.com/containrrr/watchtower) to automatically update your docker images and restart them. However, if we go there — we may as well use a tool like _docker compose_ to manage your containers, no?
|
||||
|
@ -69,7 +69,7 @@ Instructions:
|
|||
```yaml
|
||||
services:
|
||||
silverbullet:
|
||||
image: zefhemel/silverbullet
|
||||
image: ghcr.io/silverbulletmd/silverbullet
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- SB_USER=admin:admin
|
||||
|
@ -77,6 +77,7 @@ services:
|
|||
- ./space:/space
|
||||
ports:
|
||||
- 3000:3000
|
||||
# To enable auto upgrades, run watchtower
|
||||
watchtower:
|
||||
image: containrrr/watchtower
|
||||
volumes:
|
||||
|
|
Loading…
Reference in New Issue