fixed backend deployment with systemd
This commit is contained in:
parent
2d879383d4
commit
10b3550ad6
|
@ -133,6 +133,11 @@ sudo service nginx restart
|
||||||
sudo cp deployment/ticketfrei-web.service /etc/systemd/system/
|
sudo cp deployment/ticketfrei-web.service /etc/systemd/system/
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl start ticketfrei-web.service
|
sudo systemctl start ticketfrei-web.service
|
||||||
|
|
||||||
|
# create and start the backend systemd service
|
||||||
|
sudo cp deployment/ticketfrei-backend.service /etc/systemd/system
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl start ticketfrei-backend.service
|
||||||
```
|
```
|
||||||
|
|
||||||
### Logs
|
### Logs
|
||||||
|
|
|
@ -21,7 +21,7 @@ class MastodonBot(Bot):
|
||||||
try:
|
try:
|
||||||
m = Mastodon(*user.get_masto_credentials())
|
m = Mastodon(*user.get_masto_credentials())
|
||||||
except TypeError:
|
except TypeError:
|
||||||
logger.error("No Mastodon Credentials in database.", exc_info=True)
|
#logger.error("No Mastodon Credentials in database.", exc_info=True)
|
||||||
return mentions
|
return mentions
|
||||||
try:
|
try:
|
||||||
notifications = m.notifications()
|
notifications = m.notifications()
|
||||||
|
|
|
@ -30,7 +30,7 @@ class TwitterBot(Bot):
|
||||||
try:
|
try:
|
||||||
api = self.get_api(user)
|
api = self.get_api(user)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.error("Error Authenticating Twitter", exc_info=True)
|
#logger.error("Error Authenticating Twitter", exc_info=True)
|
||||||
return reports
|
return reports
|
||||||
last_mention = user.get_seen_tweet()
|
last_mention = user.get_seen_tweet()
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -9,7 +9,7 @@ ExecStart=/srv/ticketfrei/bin/python3 backend.py
|
||||||
#RuntimeDirectory=uwsgi
|
#RuntimeDirectory=uwsgi
|
||||||
Restart=always
|
Restart=always
|
||||||
KillSignal=SIGQUIT
|
KillSignal=SIGQUIT
|
||||||
Type=notify
|
Type=simple
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue