implement secret_key config

This commit is contained in:
Daniel afx 2022-02-05 17:45:24 +02:00
parent de472e177d
commit 62a99fcf1a
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,7 @@
FLASK_ENV=production FLASK_ENV=production
FLASK_APP=forest/__init__.py FLASK_APP=forest/__init__.py
APP_FOLDER=/home/app/web APP_FOLDER=/home/app/web
SECRET_KEY=1dff602d522785d27d5bc203
SQL_HOST=db SQL_HOST=db
SQL_PORT=5432 SQL_PORT=5432

View file

@ -5,6 +5,7 @@ basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object): class Config(object):
SECRET_KEY = f"{os.getenv('SECRET_KEY')}"
SQLALCHEMY_DATABASE_URI = os.getenv("DATABASE_URL", "sqlite://") SQLALCHEMY_DATABASE_URI = os.getenv("DATABASE_URL", "sqlite://")
SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_TRACK_MODIFICATIONS = False
STATIC_FOLDER = f"{os.getenv('APP_FOLDER')}/forest/static" STATIC_FOLDER = f"{os.getenv('APP_FOLDER')}/forest/static"