Merge branch 'dockerize' into 'master'
authorkaniini <ariadne@dereferenced.org>
Mon, 30 Sep 2019 10:45:09 +0000 (10:45 +0000)
committerkaniini <ariadne@dereferenced.org>
Mon, 30 Sep 2019 10:45:09 +0000 (10:45 +0000)
Add a Dockerfile and instructions to run with Docker

See merge request pleroma/relay!20

.gitignore
Dockerfile [new file with mode: 0644]
README.md

index 18f9b3b..fc8aedd 100644 (file)
@@ -96,3 +96,6 @@ ENV/
 
 viera.yaml
 viera.jsonld
+
+# config file
+relay.yaml
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..55db022
--- /dev/null
@@ -0,0 +1,11 @@
+FROM python:3-alpine
+WORKDIR /workdir
+RUN apk add alpine-sdk autoconf automake libtool gcc
+
+ADD requirements.txt /workdir/
+RUN pip3 install -r requirements.txt
+
+ADD . /workdir/
+CMD ["python", "-m", "relay"]
+
+VOLUME ["/workdir/data"]
index 90bc89b..a52af9f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -69,3 +69,13 @@ This will show the available management tasks:
 
 When following remote relays, you should use the `/actor` endpoint as you would in
 Pleroma and other LitePub-compliant software.
+
+## Docker
+
+You can run ActivityRelay with docker. Edit `relay.yaml` so that the database
+location is set to `./data/relay.jsonld` and then build and run the docker
+image :
+
+    $ docker volume create activityrelay-data
+    $ docker build -t activityrelay .
+       $ docker run -d -p 8080:8080 -v activityrelay-data:/workdir/data activityrelay