Fix Commit history

This commit is contained in:
Michał Gdula 2023-06-11 20:44:00 +01:00
parent a29f06dfee
commit d26d8cb021
70 changed files with 674 additions and 477 deletions

32
TFR/server/config.py Normal file
View file

@ -0,0 +1,32 @@
import os
GAME_VERSION = "alpha"
GAME_VERSIONS = ["alpha"]
GAME_DIFFICULTIES = [0, 1, 2, 3, 4]
USER_MAX_TOKENS = 3
MAX_TOP_SCORES = 15
MAX_SEARCH_RESULTS = 5
"""
# Postgres
SECRET_KEY = os.getenv("FLASK_KEY")
user = os.getenv("DB_USER")
password = os.getenv("DB_PASSWORD")
host = os.getenv("DB_HOST")
db = os.getenv("DB_NAME")
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{user}:{password}@{host}:5432/{db}"
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_POOL_RECYCLE = 621
MIGRATION_DIR = "/data/storage/migrations"
INSTANCE_DIR = "/data/storage/instance"
"""
# SQLite
SECRET_KEY = "dev"
SQLALCHEMY_DATABASE_URI = "sqlite:///tfr.db"