A contrib/.dockerignore => contrib/.dockerignore +2 -0
@@ 0,0 1,2 @@
+docker-compose.yml
+README.md
A contrib/Dockerfile => contrib/Dockerfile +17 -0
@@ 0,0 1,17 @@
+FROM alpine AS builder
+
+RUN apk update
+RUN apk add go olm-dev g++
+RUN go install git.hnitbjorg.xyz/~edwargix/msc-link-bot@latest
+
+FROM alpine
+
+COPY --from=builder /root/go/bin/msc-link-bot /usr/local/bin/msc-link-bot
+RUN apk add olm && \
+ adduser -h /msclinkbot -S msclinkbot
+
+USER msclinkbot
+VOLUME /msclinkbot
+WORKDIR /msclinkbot
+
+CMD /usr/local/bin/msc-link-bot
A contrib/README.md => contrib/README.md +10 -0
@@ 0,0 1,10 @@
+# contrib
+
+This directory contains various files that those looking to run/deploy
+`msc-link-bot` may find useful.
+
+- `Dockerfile` --- a simple Dockerfile that builds and runs `msc-link-bot` in a
+ docker image
+- `docker-compose.yml` --- a simple [compose](https://docs.docker.com/compose/)
+ file that sets up the volume and environment variable needed to fully run the
+ `Dockerfile` image
A contrib/docker-compose.yml => contrib/docker-compose.yml +18 -0
@@ 0,0 1,18 @@
+version: "3"
+
+services:
+ msclinkbot:
+ build: .
+ environment:
+ HOMESERVER: https://matrix.example.org
+ USER_ID: '@msclinkbot:example.org'
+ # these values can be generated with
+ # https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-login
+ DEVICE_ID: 'FWQXHAAVLF'
+ ACCESS_TOKEN: '<super_secret_access_token>'
+ volumes:
+ # needed to retain crypto.db
+ - msclinkbot:/msclinkbot
+
+volumes:
+ msclinkbot: