staltz / easy-ssb-pub

An easy-to-host server that runs an SSB "Pub"
GNU Affero General Public License v3.0
209 stars 35 forks source link

Add a local volume for .ssb #3

Closed don-smith closed 7 years ago

don-smith commented 7 years ago

Currently the folder Scuttlebot uses for the database and its credentials is kept inside the container at /root/.ssb. Each time docker run gets called, it creates a new container and thus a new .ssb folder with new keys and an empty database. If we add a volume that maps a local /shared folder and tell sbot to use that folder (--path /shared) we can docker run as much as we like (to improve this solution over time) and we won't destroy the relationship between the pub and its contacts.

I'm happy to submit a PR in the next few days. At this point, I just wanted to capture the need. I've already had to notify my pub's contacts once that its keys are changing and that they need to unfollow it and get a new invite. Looks like I'm going to have to do it at least once more.

staltz commented 7 years ago

Absolutely agree and would appreciate a PR. I'm a docker newbie and obviously didn't get everything right at first.

don-smith commented 7 years ago

Update: I put some energy to this last night and should finish up my testing tonight.

staltz commented 7 years ago

Great! I'm making some updates to this project so it can run on Heroku or Zeit Now and similar services that support just one open port.

staltz commented 7 years ago

This is now done, check the README.md guides for docker run :)