make db config work in instance dir when package

This commit is contained in:
Lili (Tlapka) 2022-09-23 11:49:32 +02:00
parent 2f54388814
commit ac0f5c4549
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,9 @@ from tlapbot.owncast_helpers import is_stream_live, give_points_to_chat
def create_app(test_config=None):
app = Flask(__name__, instance_relative_config=True)
app.config.from_mapping(
DATABASE=os.path.join(app.instance_path, "tlapbot.sqlite")
)
app.config.from_object('tlapbot.default_config')
app.config.from_pyfile('config.py')

View File

@ -1,5 +1,4 @@
SECRET_KEY='dev'
DATABASE='./instance/tlapbot.sqlite'
OWNCAST_ACCESS_TOKEN=''
OWNCAST_INSTANCE_URL='http://localhost:8080'
POINTS_CYCLE_TIME=600