
import os

class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY')
    SSL_DISABLE = False
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_RECORD_QUERIES = True
    SQLALCHEMY_TRACK_MODIFICATIONS = True
    ADMIN = os.environ.get('FLASK_ADMIN') # user@mail.com
    GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
    GITHUB_USER = 'archever'
    GITHUB_REPO = 'pub'
    GITHUB_CLIENT_ID = os.environ.get('GITHUB_CLIENT_ID')
    GITHUB_SECRET_ID = os.environ.get('GITHUB_SECRET_ID')
    MONGO_URI = "mongodb://{user}@{host}:{port}/{db_name}?authMechanism=MONGODB-CR".format(
            user=os.environ.get('MONGO_USER'),
            host='119.23.74.55',
            port=27017,
            db_name='admin'
        )

    @staticmethod
    def init_app(app):
        pass

class DevelopmentConfig(Config):
    DEBUG = True
    # MYSQL_USER = os.environ.get('MYSQL_USER') # user:pwd
    # SQLALCHEMY_DATABASE_URI = 'mysql://{}@/119.23.74.55:3306/archever_me'.format(MYSQL_USER)


config = {
    'development': DevelopmentConfig,

    'default': DevelopmentConfig
}
