implement secret_key config
This commit is contained in:
parent
de472e177d
commit
62a99fcf1a
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
@ -19,4 +20,4 @@ MAIL_SERVER=smtp.gmail.com
|
||||||
MAIL_USERNAME=admin@gmail.com
|
MAIL_USERNAME=admin@gmail.com
|
||||||
MAIL_PASSWORD=kur
|
MAIL_PASSWORD=kur
|
||||||
MAIL_PORT=25
|
MAIL_PORT=25
|
||||||
MAIL_USE_TLS=1
|
MAIL_USE_TLS=1
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -16,4 +17,4 @@ class Config(object):
|
||||||
MAIL_PORT = f"{os.getenv('MAIL_PORT')}"
|
MAIL_PORT = f"{os.getenv('MAIL_PORT')}"
|
||||||
MAIL_SUBJECT_PREFIX = f"{os.getenv('MAIL_SUBJECT_PREFIX')}"
|
MAIL_SUBJECT_PREFIX = f"{os.getenv('MAIL_SUBJECT_PREFIX')}"
|
||||||
MAIL_ADMIN = f"{os.getenv('MAIL_ADMIN')}"
|
MAIL_ADMIN = f"{os.getenv('MAIL_ADMIN')}"
|
||||||
MAIL_USE_TLS = f"{os.getenv('MAIL_USE_TLS')}"
|
MAIL_USE_TLS = f"{os.getenv('MAIL_USE_TLS')}"
|
||||||
|
|
Loading…
Reference in a new issue