From af61b51c2342c5688833bc834ebc2af5611e4287 Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Tue, 16 Aug 2016 16:54:07 +0000 Subject: [PATCH] clean up SQL config to be inline with the README --- config_template.py | 11 ++++++++++- config_template_docker.py | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config_template.py b/config_template.py index f9aad2e..e0e18e3 100644 --- a/config_template.py +++ b/config_template.py @@ -19,7 +19,16 @@ LOG_FILE = 'logfile.log' UPLOAD_DIR = os.path.join(basedir, 'upload') # DATABASE CONFIG -SQLALCHEMY_DATABASE_URI = 'mysql://root:123456@192.168.59.103/pdns' # You'll need MySQL-python +#You'll need MySQL-python +SQLA_DB_USER = 'powerdnsadmin' +SQLA_DB_PASSWORD = 'powerdnsadminpassword' +SQLA_DB_HOST = 'mysqlhostorip' +SQLA_DB_NAME = 'powerdnsadmin' + +#MySQL +SQLALCHEMY_DATABASE_URI = 'mysql://'+SQLA_DB_USER+':'\ + +SQLA_DB_PASSWORD+'@'+SQLA_DB_HOST+'/'+SQLA_DB_NAME +#SQLite #SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/your/pdns.db' SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') SQLALCHEMY_TRACK_MODIFICATIONS = True diff --git a/config_template_docker.py b/config_template_docker.py index 3031748..032a225 100644 --- a/config_template_docker.py +++ b/config_template_docker.py @@ -19,7 +19,17 @@ LOG_FILE = '/dev/stdout' UPLOAD_DIR = os.path.join(basedir, 'upload') # DATABASE CONFIG -SQLALCHEMY_DATABASE_URI = 'mysql://root:PowerDNSAdminPassword@mysqldb/powerdns-admin' +#You'll need MySQL-python +SQLA_DB_USER = 'powerdnsadmin' +SQLA_DB_PASSWORD = 'powerdnsadminpassword' +SQLA_DB_HOST = 'mysqlhostorip' +SQLA_DB_NAME = 'powerdnsadmin' + +#MySQL +SQLALCHEMY_DATABASE_URI = 'mysql://'+SQLA_DB_USER+':'\ + +SQLA_DB_PASSWORD+'@'+SQLA_DB_HOST+'/'+SQLA_DB_NAME +#SQLite +#SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/your/pdns.db' SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') SQLALCHEMY_TRACK_MODIFICATIONS = True