mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-12 16:40:26 +00:00
Merge pull request #104 from wzyboy/remove-mysql-dep
Users could use SQLite instead of MySQL
This commit is contained in:
commit
5eaf422f0d
@ -37,11 +37,15 @@ This will enable API access in PowerDNS so PowerDNS-Admin can intergrate with Po
|
|||||||
|
|
||||||
### Create Database
|
### Create Database
|
||||||
We will create a database which used by this web application. Please note that this database is difference from pdns database itself.
|
We will create a database which used by this web application. Please note that this database is difference from pdns database itself.
|
||||||
|
|
||||||
|
You could use any database that SQLAlchemy supports. For example MySQL (you will need to `pip install MySQL-python` to use MySQL backend):
|
||||||
```
|
```
|
||||||
MariaDB [(none)]> CREATE DATABASE powerdnsadmin;
|
MariaDB [(none)]> CREATE DATABASE powerdnsadmin;
|
||||||
|
|
||||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON powerdnsadmin.* TO powerdnsadmin@'%' IDENTIFIED BY 'your-password';
|
MariaDB [(none)]> GRANT ALL PRIVILEGES ON powerdnsadmin.* TO powerdnsadmin@'%' IDENTIFIED BY 'your-password';
|
||||||
```
|
```
|
||||||
|
For testing purpose, you could also use SQLite as backend. This way you do not have to install `MySQL-python` dependency.
|
||||||
|
|
||||||
|
|
||||||
### PowerDNS-Admin
|
### PowerDNS-Admin
|
||||||
|
|
||||||
|
@ -19,12 +19,13 @@ LOG_FILE = 'logfile.log'
|
|||||||
UPLOAD_DIR = os.path.join(basedir, 'upload')
|
UPLOAD_DIR = os.path.join(basedir, 'upload')
|
||||||
|
|
||||||
# DATABASE CONFIG
|
# DATABASE CONFIG
|
||||||
SQLALCHEMY_DATABASE_URI = 'mysql://root:123456@192.168.59.103/pdns'
|
SQLALCHEMY_DATABASE_URI = 'mysql://root:123456@192.168.59.103/pdns' # You'll need MySQL-python
|
||||||
|
#SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/your/pdns.db'
|
||||||
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
|
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
|
||||||
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
||||||
|
|
||||||
# LDAP CONFIG
|
# LDAP CONFIG
|
||||||
LDAP_TYPE = 'ldap' # use 'ad' for MS Active Directory
|
LDAP_TYPE = 'ldap' # use 'ad' for MS Active Directory
|
||||||
LDAP_URI = 'ldaps://your-ldap-server:636'
|
LDAP_URI = 'ldaps://your-ldap-server:636'
|
||||||
LDAP_USERNAME = 'cn=dnsuser,ou=users,ou=services,dc=duykhanh,dc=me'
|
LDAP_USERNAME = 'cn=dnsuser,ou=users,ou=services,dc=duykhanh,dc=me'
|
||||||
LDAP_PASSWORD = 'dnsuser'
|
LDAP_PASSWORD = 'dnsuser'
|
||||||
|
@ -2,7 +2,6 @@ Flask>=0.10
|
|||||||
Flask-WTF>=0.11
|
Flask-WTF>=0.11
|
||||||
Flask-Login>=0.2.11
|
Flask-Login>=0.2.11
|
||||||
configobj==5.0.5
|
configobj==5.0.5
|
||||||
MySQL-python==1.2.5
|
|
||||||
py-bcrypt==0.4
|
py-bcrypt==0.4
|
||||||
requests==2.7.0
|
requests==2.7.0
|
||||||
python-ldap==2.4.21
|
python-ldap==2.4.21
|
||||||
|
Loading…
Reference in New Issue
Block a user