mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-07 10:55:40 +00:00
Update README and LGTM fixes
This commit is contained in:
parent
354383f0ec
commit
c1fae6f3dd
12
README.md
12
README.md
@ -17,20 +17,16 @@ A PowerDNS web interface with advanced features.
|
|||||||
- Dashboard and pdns service statistics
|
- Dashboard and pdns service statistics
|
||||||
- DynDNS 2 protocol support
|
- DynDNS 2 protocol support
|
||||||
- Edit IPv6 PTRs using IPv6 addresses directly (no more editing of literal addresses!)
|
- Edit IPv6 PTRs using IPv6 addresses directly (no more editing of literal addresses!)
|
||||||
- limited API for manipulating zones and records
|
- Limited API for manipulating zones and records
|
||||||
|
|
||||||
### Running PowerDNS-Admin
|
### Running PowerDNS-Admin
|
||||||
There are several ways to run PowerDNS-Admin. Following is a simple way to start PowerDNS-Admin using Docker
|
There are several ways to run PowerDNS-Admin. Following is a simple way to start PowerDNS-Admin using Docker
|
||||||
|
|
||||||
Step 1: Build docker image
|
Step 1: Update the configuration
|
||||||
|
|
||||||
```$ docker-compose build```
|
Edit the `docker-compose.yml` file to update the database connection string in `SQLALCHEMY_DATABASE_URI`. Other environment variables are mentioned in the [legal_envvars](https://github.com/ngoduykhanh/PowerDNS-Admin/blob/master/configs/docker_config.py#L5-L37).
|
||||||
|
|
||||||
Step 2: Change the configuration
|
Step 2: Start docker container
|
||||||
|
|
||||||
Edit the `docker-compose.yml` file to update the database connection string in `SQLALCHEMY_DATABASE_URI`.
|
|
||||||
|
|
||||||
Step 3: Start docker container
|
|
||||||
|
|
||||||
```$ docker-compose up```
|
```$ docker-compose up```
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ def create_app(config=None):
|
|||||||
# HSTS
|
# HSTS
|
||||||
if app.config.get('HSTS_ENABLED'):
|
if app.config.get('HSTS_ENABLED'):
|
||||||
from flask_sslify import SSLify
|
from flask_sslify import SSLify
|
||||||
_sslify = SSLify(app) # lgtm [py/unused-import]
|
_sslify = SSLify(app) # lgtm [py/unused-local-variable]
|
||||||
|
|
||||||
# Load app's components
|
# Load app's components
|
||||||
assets.init_app(app)
|
assets.init_app(app)
|
||||||
|
@ -131,7 +131,7 @@ def api_basic_auth(f):
|
|||||||
abort(401)
|
abort(401)
|
||||||
else:
|
else:
|
||||||
user = User.query.filter(User.username == username).first()
|
user = User.query.filter(User.username == username).first()
|
||||||
current_user = user
|
current_user = user # lgtm [py/unused-local-variable]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.error('Error: {0}'.format(e))
|
current_app.logger.error('Error: {0}'.format(e))
|
||||||
abort(401)
|
abort(401)
|
||||||
|
@ -20,4 +20,4 @@ from .record_entry import RecordEntry
|
|||||||
|
|
||||||
def init_app(app):
|
def init_app(app):
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
_migrate = Migrate(app, db) # lgtm [py/unused-import]
|
_migrate = Migrate(app, db) # lgtm [py/unused-local-variable]
|
||||||
|
@ -287,8 +287,7 @@ class Domain(db.Model):
|
|||||||
account_id = None
|
account_id = None
|
||||||
# add new domain
|
# add new domain
|
||||||
d = Domain()
|
d = Domain()
|
||||||
d.name = domain['name'].rstrip(
|
d.name = domain['name'].rstrip('.') # lgtm [py/modification-of-default-value]
|
||||||
'.') # lgtm [py/modification-of-default-value]
|
|
||||||
d.master = str(domain['masters'])
|
d.master = str(domain['masters'])
|
||||||
d.type = domain['kind']
|
d.type = domain['kind']
|
||||||
d.serial = domain['serial']
|
d.serial = domain['serial']
|
||||||
|
Loading…
Reference in New Issue
Block a user