forked from ticketfrei/ticketfrei
Merge branch 'multi-deployment' of dl6tom.de:public/ticketfrei into multi-deployment
This commit is contained in:
commit
890e720c91
24
README.md
24
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
|
||||
```
|
||||
|
|
31
deployment/example.org.conf
Normal file
31
deployment/example.org.conf
Normal file
|
@ -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;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue