From 2d7b222c2114fe47c377cd692eda9ae7a1e08df9 Mon Sep 17 00:00:00 2001
From: b3yond <b3yond@riseup.net>
Date: Mon, 26 Mar 2018 21:21:51 +0200
Subject: [PATCH 1/2] removed attribution of author in bridged reports. #2

---
 report.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/report.py b/report.py
index d58c25e..3575f2e 100644
--- a/report.py
+++ b/report.py
@@ -29,8 +29,9 @@ class Report(object):
         Format the report for bot.post()
 
         :rtype: string
-        :return: toot: text to be tooted, e.g. "_b3yond: There are
+        :return: toot: text to be tooted, e.g. "There are
             uniformed controllers in the U2 at Opernhaus."
         """
-        strng = self.author + ": " + self.text
-        return strng
+        # strng = self.author + ": " + self.text  # deprecated;
+        # we don't want to put the names of people too public.
+        return self.text

From 51dec7e07286a1833029f40427f1d7852e40dcde Mon Sep 17 00:00:00 2001
From: b3yond <b3yond@riseup.net>
Date: Tue, 27 Mar 2018 01:04:07 +0200
Subject: [PATCH 2/2] tested deployment and brought learnings to README. added
 nginx config.

---
 README.md                   | 24 ++++++++++++++++++++++--
 deployment/example.org.conf | 31 +++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 2 deletions(-)
 create mode 100644 deployment/example.org.conf

diff --git a/README.md b/README.md
index 2f1287c..1d2225d 100644
--- a/README.md
+++ b/README.md
@@ -74,7 +74,7 @@ We wrote these installation notes, so you can set up the website easily:
 To Do:
 
 ```shell
-sudo apt install python3 virtualenv uwsgi uwsgi-plugin-python nginx 
+sudo apt install python3 virtualenv uwsgi uwsgi-plugin-python3 nginx 
 ```
 
 * set up nginx
@@ -92,7 +92,7 @@ virtualenv -p python3 .
 Install the dependencies:
 
 ```shell
-pip install tweepy pytoml requests Mastodon.py bottle pyjwt 
+pip install tweepy pytoml Mastodon.py bottle pyjwt pylibscrypt
 ```
 
 Configure the bot:
@@ -105,3 +105,23 @@ vim config.toml
 This configuration is only for the admin. Users can log into
 twitter/mastodon/mail and configure their personal bot on the settings page.
 
+Deploy ticketfrei with uwsgi:
+
+```shell
+echo "Enter your domain name into the following prompt:" && read DOMAIN
+
+# configure nginx
+sudo sed -r "s/example.org/$DOMAIN/g" deployment/example.org.conf > /etc/nginx/sites-enabled/$DOMAIN.conf
+
+# create folder for socket
+sudo mkdir /var/run/ticketfrei
+sudo chown tech:www-data -R /var/run/ticketfrei
+
+# start up nginx
+sudo service nginx restart
+
+# create and start the frontend systemd service
+sudo cp deployment/ticketfrei-web.service /etc/systemd/system/
+sudo systemctl daemon-reload
+sudo systemctl start ticketfrei-web.service
+```
diff --git a/deployment/example.org.conf b/deployment/example.org.conf
new file mode 100644
index 0000000..c9ea425
--- /dev/null
+++ b/deployment/example.org.conf
@@ -0,0 +1,31 @@
+server {
+
+    listen 443 ssl;
+    server_name example.org;
+    ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem;
+    ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem;
+    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
+    ssl_ciphers         HIGH:!aNULL:!MD5;
+
+    access_log /var/log/nginx/example.org_access.log;
+    error_log /var/log/nginx/example.org_error.log;
+
+    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+
+    location / {
+        include uwsgi_params;
+
+        uwsgi_pass unix:///var/run/ticketfrei/ticketfrei.sock;
+    }
+
+    location /.well-known/acme-challenge {
+        root /var/www/acme;
+    }
+}
+server {
+    listen 80;
+    listen [::]:80;
+    server_name example.org;
+    return 301 https://$server_name$request_uri;
+}
+