diff options
author | B Stack <bgstack15@gmail.com> | 2022-02-14 15:42:18 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2022-02-14 15:42:18 -0500 |
commit | 75d6e39dcaa27f0404e606a188fa4de46cae91f9 (patch) | |
tree | 3377f78bd332e2c93e8dfc262f92918284a664cc | |
parent | suppress favicon errors (diff) | |
download | stackbin-75d6e39dcaa27f0404e606a188fa4de46cae91f9.tar.gz stackbin-75d6e39dcaa27f0404e606a188fa4de46cae91f9.tar.bz2 stackbin-75d6e39dcaa27f0404e606a188fa4de46cae91f9.zip |
add initial centos7 doc
-rw-r--r-- | README.md | 10 | ||||
-rwxr-xr-x | stackbin.py | 3 | ||||
-rw-r--r-- | stackbin.wsgi.ini | 5 |
3 files changed, 14 insertions, 4 deletions
@@ -13,7 +13,15 @@ This is my proposed solution to my pastebin problem. * UUIDs instead of sequential integer ID numbers * Private pastes (accessible to admin, and to users with the whole link) -# Instructions +# Using stackbin +## Installing + +You can use flask for development servers, and uwsgi for production. For a production stack on CentOS 7: + + yum install nginx uwsgi uwsgi-logger-file python36-flask uwsgi-plugin-python36 python36-sqlalchemy python36-uwsgidecorators + pip3 install --user flask-sqlalchemy pytimeparse + +## Instructions Configure the application with `config.cfg` based on `config.cfg.example`. diff --git a/stackbin.py b/stackbin.py index 4c0d164..bcfd3d5 100755 --- a/stackbin.py +++ b/stackbin.py @@ -10,7 +10,7 @@ from pytimeparse.timeparse import timeparse # python3-pytimeparse try: from uwsgidecorators import timer # python3-uwsgidecorators except: - pass + print("Warning! Without uwsgidecorators, the cleanup timer cannot run.") import time ## ripped from https://stackoverflow.com/questions/183042/how-can-i-use-uuids-in-sqlalchemy/812363#812363 @@ -284,5 +284,4 @@ def favicon(): abort(404) if __name__ == "__main__": - manager.add_command('runserver', Server(host=app.config["APP_HOST"], port=app.config["APP_PORT"])) app.run() diff --git a/stackbin.wsgi.ini b/stackbin.wsgi.ini index 4b38ea8..cf35ffb 100644 --- a/stackbin.wsgi.ini +++ b/stackbin.wsgi.ini @@ -1,5 +1,8 @@ [uwsgi] -plugins = logfile +# CentOS 7 uwsgi needs "python36" added to this list. +plugins = logfile, python36 +# Devuan does not. +#plugins = logfile http-socket = 0.0.0.0:5000 wsgi-file = stackbin.py callable = app |