* Update README.md

* Update README.md

* Fixed problem with docker volume mount location

* Updated docker compose with new volume mount location

* Fixed folder creation for db file

* Added support for cross-timezone clients

* Fixed database test

Co-authored-by: Noted <57927413+ItsNoted@users.noreply.github.com>
This commit is contained in:
Casvt
2023-01-24 15:33:16 +01:00
committed by GitHub
parent dfc949e766
commit d1d39a94ff
10 changed files with 45 additions and 28 deletions

View File

@@ -1,21 +1,21 @@
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
from os import urandom
from os.path import dirname, join, abspath
from os import makedirs, urandom
from os.path import abspath, dirname, join
from sys import version_info
from flask import Flask, render_template, request
from waitress.server import create_server
from backend.db import close_db, setup_db, DBConnection
from backend.db import DBConnection, close_db, setup_db
from frontend.api import api, reminder_handler
from frontend.ui import ui
HOST = '0.0.0.0'
PORT = '8080'
THREADS = 10
DB_FILENAME = 'Noted.db'
DB_FILENAME = 'db', 'Noted.db'
def _folder_path(*folders) -> str:
"""Turn filepaths relative to the project folder into absolute paths
@@ -79,7 +79,9 @@ def Noted() -> None:
# Register web server
app = _create_app()
with app.app_context():
DBConnection.file = _folder_path(DB_FILENAME)
db_location = _folder_path(*DB_FILENAME)
makedirs(dirname(db_location), exist_ok=True)
DBConnection.file = db_location
setup_db()
reminder_handler._find_next_reminder()