From 5b921c52f6570e46fff211f51f44902c326256e5 Mon Sep 17 00:00:00 2001 From: kjwon15 Date: Thu, 27 Dec 2018 16:38:19 +0900 Subject: [PATCH] Make Dokku-able --- .gitignore | 3 +++ Procfile | 1 + app.json | 7 +++++++ bin/pre-deploy | 20 ++++++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 Procfile create mode 100644 app.json create mode 100755 bin/pre-deploy diff --git a/.gitignore b/.gitignore index 18f9b3b..5011ae1 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,6 @@ ENV/ viera.yaml viera.jsonld + +relay.jsonld +relay.yaml diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..93b6f8b --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: python -m relay diff --git a/app.json b/app.json new file mode 100644 index 0000000..c9a9b8a --- /dev/null +++ b/app.json @@ -0,0 +1,7 @@ +{ + "scripts": { + "dokku": { + "predeploy": "./bin/pre-deploy" + } + } +} diff --git a/bin/pre-deploy b/bin/pre-deploy new file mode 100755 index 0000000..e76271f --- /dev/null +++ b/bin/pre-deploy @@ -0,0 +1,20 @@ +#!/bin/bash + +cat << EOF > relay.yaml +# this is the path that the object graph will get dumped to (in JSON-LD format), +# you probably shouldn't change it, but you can if you want. +db: relay.jsonld + +# Listener +listen: 0.0.0.0 +port: ${PORT:-8080} + +# Note +note: "Make a note about your instance here." + +# this section is for ActivityPub +ap: + # this is used for generating activitypub messages, as well as instructions for + # linking AP identities. it should be an SSL-enabled domain reachable by https. + host: '$HOSTNAME' +EOF