diff --git a/app/templates/contact.html b/app/templates/contact.html index 062cc81..d6c1a1c 100644 --- a/app/templates/contact.html +++ b/app/templates/contact.html @@ -30,7 +30,7 @@ Back Home

ATTENTION: To send any sensitive information, please email me at contact@pkrm.dev and encrypt the message with my PGP public key. This form should not be thought of as a secure way of communication.

-
+ diff --git a/app/views.py b/app/views.py index 37faf76..98f25ac 100644 --- a/app/views.py +++ b/app/views.py @@ -1,10 +1,12 @@ import flask import os import discord +import dotenv app = flask.Flask(__name__) app.secret_key = os.urandom(32) -webhook_url = os.environ.get('WEBHOOK_URL') +dotenv.load_dotenv() +webhook_url = os.getenv("WEBHOOK_URL") @app.route('/', methods=['GET']) def index(): diff --git a/pkrm.service b/pkrm.service new file mode 100644 index 0000000..55ddc64 --- /dev/null +++ b/pkrm.service @@ -0,0 +1,14 @@ +# Systemd service file, feel free to edit to your needs, this isnt needed though + +[Unit] +Description=Keep PKRM.DEV Up and Running +After=network.target + +[Service] +Type=simple +WorkingDirectory=/home/parker/services/pkrm +ExecStart=/usr/bin/bash /home/parker/services/pkrm/pkrm.sh +Restart=always + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/pkrm.sh b/pkrm.sh new file mode 100644 index 0000000..d748a30 --- /dev/null +++ b/pkrm.sh @@ -0,0 +1 @@ +gunicorn -b 0.0.0.0:2121 run:app \ No newline at end of file diff --git a/run.py b/run.py index cbf55f4..39d9c44 100644 --- a/run.py +++ b/run.py @@ -1,4 +1,5 @@ from app.views import app as application +app=application if __name__ == '__main__': application.run(port="2121", debug=False) \ No newline at end of file