From e64ada6b7176d3744bc0d34a4620c4fa38a05187 Mon Sep 17 00:00:00 2001
From: wgroeneveld
Date: Mon, 17 May 2021 08:34:45 +0200
Subject: [PATCH] installation instructions separated
---
INSTALL.md | 81 +++++++++++++++++++++++++++++++++++++++++
README.md | 103 ++++++++++-------------------------------------------
2 files changed, 99 insertions(+), 85 deletions(-)
create mode 100644 INSTALL.md
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..fde5d10
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,81 @@
+# Go-Jamming installation guide
+
+## 1. Installing
+
+Download the latest binary version from the [GitHub releases page](https://github.com/wgroeneveld/go-jamming/releases). This is a **single binary** and installing it is just a matter of copy-pasting it to your sever! Simply execute with `./go-jamming`.
+
+### Compiling it yourself (optional)
+
+If your target OS is not listed, you can build it yourself with one simple command: `go build`. Go 1.16+ is required, see `go.mod` file.
+
+## 2. Configuring
+
+Place a `config.json` file in the same directory that looks like this: (below are the default values)
+
+```json
+{
+ "port": 1337,
+ "host": "localhost",
+ "token": "miauwkes",
+ "conString": "mentions.db",
+ "utcOffset": 60,
+ "allowedWebmentionSources": [
+ "brainbaking.com",
+ "jefklakscodex.com"
+ ],
+ "blacklist": [
+ "youtube.com"
+ ]
+}
+```
+
+- port, host: http server params
+- token, allowedWebmentionSources: see below, used for authentication
+- blacklist: blacklist domains from which we do NOT send to or accept mentions from.
+- utcOffset: offset in minutes for date processing, starting from UTC time.
+- conString: file path to store all mentions and author avatars in a simple key/value store, based on [buntdb](https://github.com/tidwall/buntdb). If the file does not exist yet, it will simply be created.
+
+If a config file is missing, or required keys are missing, a warning will be generated and default values will be used instead. See `common/config.go`.
+
+## 3. Reverse proxy
+
+Put it behind a reverse proxy such as nginx using something like this:
+
+```
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+
+ server_name [your-domain];
+
+ location / {
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_set_header Host $host;
+ proxy_pass http://127.0.0.1:[your-port];
+ }
+ ssl_certificate /etc/letsencrypt/live/[your-domain]/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/[your-domain]/privkey.pem;
+}
+```
+
+## 4. Linux systemd service
+
+Create a very simple Linux system service that fires up the jam:
+
+```
+[Unit]
+Description=Go-Jamming
+After=network.target
+
+[Service]
+User=[myuser]
+WorkingDirectory=/var/www/gojamming
+ExecStart=/var/www/gojamming/go-jamming
+SuccessExitStatus=0
+
+[Install]
+WantedBy=multi-user.target
+```
+
+Now install using `sudo systemctl enable/install gojamming` and you're done!
diff --git a/README.md b/README.md
index 627e5a6..701a3f1 100644
--- a/README.md
+++ b/README.md
@@ -4,101 +4,36 @@ Go module `brainbaking.com/go-jamming`:
> A minimalistic Go-powered jamstack-augmented microservice for webmentions etc
-✅️ **This is a fork of [serve-my-jams](https://github.com/wgroeneveld/serve-my-jams)**, the Node-powered original microservice, which is no longer being maintained.
+This is a set of minimalistic Go-based microservices that aid you in your [IndieWeb](https://indieweb.org/) Jamstack coolness 😎. Currently, it handles **Webmentions** and **Pingbacks** for your statically generated website.
-**Are you looking for a way to DO something with this?** See https://github.com/wgroeneveld/jam-my-stack !
+Go-jamming acts as an easy drop-in replacement for [webmention.io](https://webmention.io).
-This is a set of minimalistic Go-based microservices that aid you in your IndieWeb Jamstack coolness 😎 (name-dropping). While [jam-my-stack](https://github.com/wgroeneveld/jam-my-stack) is a set of scripts used to run at checkin-time, this is a dymamic service that handles requests.
-
-Inspect how it's used on https://brainbaking.com/ - usually, a `` in your `` suffices:
+Usage is very simple, a `` in your `