Help, switching to Docker, existing Space

I've had SB running locally from the binary for a while now.

I want to start accessing it from other than Localhost, so I've got Tailscale up and I'm trying to get Docker going, using Zef's instructions here. I changed the "-v" parameter to "-v /DATA/Documents/sb:/sb"

I've disabled auto-start of the binary SB, and the Docker instance works, Localhost:3000/sb shows the "Welcome to the wondrous world of SilverBullet" page. (in fact it also shows that page without the '/sb')

Can anyone help me get the Docker instance to start serving the files I've already got?

THANKS!

Doesn't Silverbullet docker use "/space" as the directory?

docker run -d --restart unless-stopped \
  --name silverbullet \
  -p 3000:3000 \
  -v ./space:/space \
  ghcr.io/silverbulletmd/silverbullet:latest

So you'd have to change the paramenter to -v /DATA/Documents/sb:/space for it to work.

If you want to run your server in multi-space mode, study Space%20Manager

Please use a compose file instead. Much easier to make changes.

Go to the old sb folder and do a pwd. Use that exact path to pair with /space.

Also, using tailscale, you can use a FQDN (subdomain would do) and traefik to get proper SSL. If you need any help with it, please let me know.

Thanks, Mike......I got the docker instance working with my old INDEX.md and the files and directories that were in the root of my old space.

I'm using docker compose now, as well. This is my compose.yaml:

services:
  silverbullet:
    image: ghcr.io/silverbulletmd/silverbullet:latest
    restart: unless-stopped
    environment:
    - SB_USER=me:MyPassWord
    - SB_INDEX_PAGE=INDEX
    volumes:
      - /DATA/Documents/silverbullet/space:/space
    ports:
      - 3000:3000

/DATA/Documents/silverbullet is where my old space lived. I did 'mkdir space' and moved all the files into it.

But SB is not indexing any of the symlinked folders -- I can only see files and directories that are actually in the space. And I can't get Document Explorer plug working. (related??)

I seem to remember having problems with symlinks in the past.....

Docker doesn't support symlinking files

Seems like a pretty important point to add to the sales pitch.

Thanks for the heads-up. Looks like it's back to the binary.....

You can use symlinks, but Docker does not automatically follow symlinks to the destination on the host filesystem on it's own. You have to make sure that you mount (make available) the symlink destinations at the exact same paths inside the container.

So if you have /DATA/Documents/silverbullet/space/a-symlink with destination /DATA/Documents/notes/a-symlink-destination, you would have to add (in addition to your space)

    volumes:
      - /DATA/Documents/notes/a-symlink-destination:/DATA/Documents/notes/a-symlink-destination

That way, the symlink destination will still exist inside the container.