ahdinosaur / ssb-pub

easily host your own Secure ScuttleButt (SSB) pub in a docker container
http://butt.nz/
GNU Affero General Public License v3.0
158 stars 25 forks source link

Adding ssb-viewer to the container, and then removing the container, removes ssb-viewer. #24

Closed Abekonge closed 5 years ago

Abekonge commented 5 years ago

In readme you write:


(optional) add ssb-viewer plugin

enter your sbot container with:

docker exec -it sbot bash

then run:

npm install -g git-ssb
mkdir -p ~/.ssb/node_modules
cd ~/.ssb/node_modules
git clone ssb://%MeCTQrz9uszf9EZoTnKCeFeIedhnKWuB3JHW2l1g9NA=.sha256 ssb-viewer
cd ssb-viewer
npm install
sbot plugins.enable ssb-viewer

edit your config to include

{
  "plugins": {
    "ssb-viewer": true
  },
  "viewer": {
    "host": "0.0.0.0"
  }
}

edit your ./create-sbot to include -p 8807:8807.

stop, remove, and re-create sbot:

docker stop sbot
docker rm sbot
./create-sbot

But if you first enter a container and installs something, and then afterwards you stop and rm the container, what you installed will be gone, right?

ahdinosaur commented 5 years ago

But if you first enter a container and installs something, and then afterwards you stop and rm the container, what you installed will be gone, right?

hi @Abekonge! :smiley_cat:

as far as i understand, no.

you're entering the container so you can install something to ~/ssb-pub-data, which will persistent beyond the lifetime of the container.

does that make sense?

Abekonge commented 5 years ago

Of course yes! Ah, it takes some headspace sometimes to hold the mental model of docker sometimes.

I guess the (npm) global installation of git-ssb will be gone though - but that sbould not hinder functionality. In will test later. Closing and thanks a lot for this very thourough guide and your reviving zombie sbot functionality - it's very helpful!