Commit d63069c49df59de43bb9551cb79e4756d3015561
in the beginning
Michael Williams committed on 11/15/2017, 9:42:19 AMFiles changed
Dockerfile | added |
LICENSE.md | added |
README.md | added |
package.json | added |
run.sh | added |
Dockerfile | ||
---|---|---|
@@ -1,0 +1,23 @@ | ||
1 … | +FROM node:8 | |
2 … | + | |
3 … | +MAINTAINER Michael Williams <michael.williams@enspiral.com> | |
4 … | + | |
5 … | +USER root | |
6 … | +RUN mkdir /home/node/.npm-global ; \ | |
7 … | + mkdir -p /home/node/ssb-pub ; \ | |
8 … | + chown -R node:node /home/node/.npm-global | |
9 … | +ENV PATH=/home/node/.npm-global/bin:$PATH | |
10 … | +ENV NPM_CONFIG_PREFIX=/home/node/.npm-global | |
11 … | + | |
12 … | +WORKDIR /home/node/ssb-pub | |
13 … | +ADD ./run.sh . | |
14 … | +RUN chmod +x ./run.sh | |
15 … | +RUN chown -R node:node /home/node/ssb-pub | |
16 … | + | |
17 … | +USER node | |
18 … | +RUN npm install -g scuttlebot@10.4.4 | |
19 … | + | |
20 … | +EXPOSE 8008 | |
21 … | + | |
22 … | +ENTRYPOINT [ "./run.sh" ] | |
23 … | +CMD [ "server" ] |
LICENSE.md |
---|
README.md | ||
---|---|---|
@@ -1,0 +1,55 @@ | ||
1 … | +# ssb-pub | |
2 … | + | |
3 … | +__work in progress__ | |
4 … | + | |
5 … | +easily host your own Secure ScuttleButt (SSB) pub in a docker container | |
6 … | + | |
7 … | +to run a pub you need to have a static public IP, ideally with a DNS record (i.e.`<hostname.yourdomain.tld>`) | |
8 … | + | |
9 … | +## install image | |
10 … | + | |
11 … | +#### (option a) pull image from docker hub | |
12 … | + | |
13 … | +``` | |
14 … | +docker pull ahdinosaur/ssb-pub | |
15 … | +``` | |
16 … | + | |
17 … | +#### (option b) build image from source | |
18 … | + | |
19 … | +from GitHub: | |
20 … | + | |
21 … | +```shell | |
22 … | +git clone https://github.com/ahdinosaur/ssb-pub.git | |
23 … | +cd ssb-pub | |
24 … | +docker build -t ssb-pub . | |
25 … | +``` | |
26 … | + | |
27 … | +## start service | |
28 … | + | |
29 … | +#### 1. create a directory on the docker host for persisting the pub's data | |
30 … | + | |
31 … | +```shell | |
32 … | +mkdir ~/ssb-pub-data | |
33 … | +``` | |
34 … | + | |
35 … | +#### 2. run the container | |
36 … | + | |
37 … | +```shell | |
38 … | +docker run --name my-ssb-pub \ | |
39 … | + -d -v ~/ssb-pub-data/:/home/node/.ssb/ \ | |
40 … | + -e HOST="<hostname.yourdomain.tld>" \ | |
41 … | + -p 8008:8008 --restart unless-stopped \ | |
42 … | + ssb-pub | |
43 … | +``` | |
44 … | + | |
45 … | +## create invites | |
46 … | + | |
47 … | +``` | |
48 … | +ssh root@<hostname.yourdomain.tld> invite.create 1 | |
49 … | +``` | |
50 … | + | |
51 … | +## control service | |
52 … | + | |
53 … | +- `docker stop my-ssb-pub` | |
54 … | +- `docker stop my-ssb-pub` | |
55 … | +- `docker restart my-ssb-pub` |
package.json | ||
---|---|---|
@@ -1,0 +1,11 @@ | ||
1 … | +{ | |
2 … | + "name": "ssb-pub", | |
3 … | + "version": "0.0.0", | |
4 … | + "description": "easily host your own Secure ScuttleButt (SSB) pub in a docker container", | |
5 … | + "scripts": { | |
6 … | + "build": "docker build -t ahdinosaur/ssb-pub .", | |
7 … | + "start": "docker run -it --rm ahdinosaur/ssb-pub", | |
8 … | + "publish": "docker push ahdinosaur/ssb-pub" | |
9 … | + }, | |
10 … | + "license": "AGPL-3.0" | |
11 … | +} |
Built with git-ssb-web