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

Simplify dockerfile #5

Open don-smith opened 7 years ago

don-smith commented 7 years ago

There is quite a bit in the Dockerfile that isn't needed if you use an official Node image. And the necessary LevelDB dependencies are installed with npm install.

I increased the RAM ceiling to use more of a common 1GB limit and removed the swap limitation since that's just disk that may or may not be available.

I'm also a big fan of docker-compose, but in order for the .ssb folder to be placed in the host's /shared folder, we need to pass the --path option to Scuttlebot.

don-smith commented 7 years ago

In retrospect, this should be 2 PRs, one for the simplified Dockerfile and another to add the SSB_PATH. I'm happy to tease them apart if you only want one set of changes.

staltz commented 7 years ago

I remember having problems with the official Node image (also with Node v6.10 as opposed to node v6.9.1) but I can give a second try. Also, I really need the 500mb RAM limit because my 2 VPSs have that limit. It's basically the memory limit for the cheapest servers out there. If people have better servers, it's just a matter of changing an arg to docker run anyway.

JesseObrien commented 7 years ago

Any opposition to using the node:alpine image? It's a lot smaller than the node one. I've typically found it nicer to deploy because of that as well.