Skip to content

Commit a50d29c

Browse files
author
Ben Firestone
committed
moving to sqlite3
1 parent c4d9f20 commit a50d29c

File tree

199 files changed

+24653
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+24653
-45
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pushd pdns-recursor
2+
docker build -t krypticlabs/pdns-recursor .
3+
popd
4+
5+
pushd pdns-mysql
6+
docker build -t krypticlabs/pdns-mysql .
7+
popd
8+
9+
pushd pdns-server
10+
docker build -t krypticlabs/pdns-server .
11+
popd

docker-compose.yaml

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.7'
22

33
services:
44
pdns-server:
5-
image: krypticlabs/pdns-server
5+
image: dockerhub.krypticlabs.com/powerdns/pdns-server
66
hostname: ${PDNS_HOST}
77
container_name: ${PDNS_HOST}
88
networks:
@@ -12,11 +12,6 @@ services:
1212
- '53'
1313
- '53/udp'
1414
environment:
15-
- PDNS_gmysql_host=${PDNS_DB_HOST}
16-
- PDNS_gmysql_port=${PDNS_DB_PORT}
17-
- PDNS_gmysql_user=${PDNS_DB_USER}
18-
- PDNS_gmysql_password=${PDNS_DB_PASSWORD}
19-
- PDNS_gmysql_dbname=${PDNS_DB_NAME}
2015
- PDNS_master=yes
2116
- PDNS_api=yes
2217
- PDNS_api_key=${PDNS_API_KEY}
@@ -29,19 +24,17 @@ services:
2924
- PDNS_soa_minimum_ttl=1200
3025
- PDNS_default_soa_name=ns1.ramstone.net
3126
- PDNS_default_soa_mail=hostmaster.ramstone.net
32-
depends_on:
33-
- pdns-mysql
3427

3528

3629
pdns-recursor:
37-
image: krypticlabs/pdns-recursor
30+
image: dockerhub.krypticlabs.com/powerdns/pdns-recursor
3831
hostname: ${PDNS_RECURSOR_HOST}
3932
container_name: ${PDNS_RECURSOR_HOST}
4033
networks:
4134
- default_net
4235
ports:
43-
- "192.168.0.75:53:53/tcp"
44-
- "192.168.0.75:53:53/udp"
36+
- "192.168.1.45:53:53/tcp"
37+
- "192.168.1.45:53:53/udp"
4538
environment:
4639
- PDNS_forward-zones=ramstone.net=${PDNS_IP}
4740
- PDNS_allow-from=192.168.0.0/23
@@ -50,28 +43,8 @@ services:
5043
depends_on:
5144
- pdns-server
5245

53-
pdns-mysql:
54-
image: krypticlabs/pdns-mysql
55-
hostname: ${PDNS_DB_HOST}
56-
container_name: ${PDNS_DB_HOST}
57-
networks:
58-
- default_net
59-
expose:
60-
- 3306
61-
environment:
62-
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
63-
- MYSQL_DATABASE=${PDNS_DB_NAME}
64-
- MYSQL_USER=${PDNS_DB_USER}
65-
- MYSQL_PASSWORD=${PDNS_DB_PASSWORD}
66-
volumes:
67-
- pdns-mysql-data:/var/lib/mysql
68-
healthcheck:
69-
test: ["CMD", "mysqladmin" ,"-u", "root", "--password=${MYSQL_ROOT_PASSWORD}", "ping", "-h", "localhost", "-v"]
70-
timeout: 10s
71-
retries: 5
72-
73-
admin:
74-
image: ngoduykhanh/powerdns-admin:latest
46+
pdns-admin:
47+
image: dockerhub.krypticlabs.com/powerdns/pdns-admin
7548
container_name: pdns-admin
7649
networks:
7750
- default_net
@@ -82,18 +55,13 @@ services:
8255
options:
8356
max-size: 50m
8457
environment:
85-
- SQLALCHEMY_DATABASE_URI=mysql://${PDA_DB_USER}:${PDA_DB_PASSWORD}@${PDNS_DB_HOST}/${PDA_DB_NAME}
8658
- GUNICORN_TIMEOUT=60
8759
- GUNICORN_WORKERS=2
8860
- GUNICORN_LOGLEVEL=DEBUG
8961
- OFFLINE_MODE=False
9062
depends_on:
91-
- pdns-mysql
9263
- pdns-server
9364

94-
volumes:
95-
pdns-mysql-data:
96-
9765
networks:
9866
default_net:
9967
ipam:

pdns-admin/.dockerignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
### OSX ###
2+
*.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
6+
# Icon must end with two \r
7+
Icon
8+
9+
# Thumbnails
10+
._*
11+
12+
# Files that might appear in the root of a volume
13+
.DocumentRevisions-V100
14+
.fseventsd
15+
.Spotlight-V100
16+
.TemporaryItems
17+
.Trashes
18+
.VolumeIcon.icns
19+
.com.apple.timemachine.donotpresent
20+
21+
# Directories potentially created on remote AFP share
22+
.AppleDB
23+
.AppleDesktop
24+
Network Trash Folder
25+
Temporary Items
26+
.apdisk
27+
28+
### Python ###
29+
# Byte-compiled / optimized / DLL files
30+
__pycache__/
31+
*.py[cod]
32+
*$py.class
33+
34+
# C extensions
35+
*.so
36+
37+
# Distribution / packaging
38+
.Python
39+
build/
40+
develop-eggs/
41+
dist/
42+
downloads/
43+
eggs/
44+
.eggs/
45+
lib/
46+
lib64/
47+
parts/
48+
sdist/
49+
var/
50+
wheels/
51+
*.egg-info/
52+
.installed.cfg
53+
*.egg
54+
55+
# PyInstaller
56+
# Usually these files are written by a python script from a template
57+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
58+
*.manifest
59+
*.spec
60+
61+
# Installer logs
62+
pip-log.txt
63+
pip-delete-this-directory.txt
64+
65+
# Unit test / coverage reports
66+
htmlcov/
67+
.tox/
68+
.coverage
69+
.coverage.*
70+
.cache
71+
.pytest_cache/
72+
nosetests.xml
73+
coverage.xml
74+
*.cover
75+
.hypothesis/
76+
77+
# Translations
78+
*.mo
79+
*.pot
80+
81+
# Flask stuff:
82+
flask/
83+
instance/settings.py
84+
.webassets-cache
85+
86+
# Scrapy stuff:
87+
.scrapy
88+
89+
# celery beat schedule file
90+
celerybeat-schedule.*
91+
92+
# Node
93+
node_modules
94+
npm-debug.log
95+
96+
# Docker
97+
Dockerfile*
98+
docker-compose*
99+
.dockerignore
100+
101+
# Git
102+
.git
103+
.gitattributes
104+
.gitignore
105+
106+
# Vscode
107+
.vscode
108+
*.code-workspace
109+
110+
# Others
111+
.lgtm.yml
112+
.travis.yml

pdns-admin/.lgtm.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
extraction:
2+
python:
3+
python_setup:
4+
version: 3
5+
index:
6+
exclude:
7+
- .git
8+
- upload
9+
- flask
10+
- node_modules

pdns-admin/.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: minimal
2+
script:
3+
- docker-compose -f docker-compose-test.yml up --exit-code-from powerdns-admin --abort-on-container-exit
4+
services:
5+
- docker

pdns-admin/.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--*.modules-folder "./powerdnsadmin/static/node_modules"

pdns-admin/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Khanh Ngo - ngokhanhit[at]gmail.com
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pdns-admin/README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# PowerDNS-Admin
2+
A PowerDNS web interface with advanced features.
3+
4+
[![Build Status](https://travis-ci.org/ngoduykhanh/PowerDNS-Admin.svg?branch=master)](https://travis-ci.org/ngoduykhanh/PowerDNS-Admin)
5+
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/ngoduykhanh/PowerDNS-Admin.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ngoduykhanh/PowerDNS-Admin/context:python)
6+
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/ngoduykhanh/PowerDNS-Admin.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ngoduykhanh/PowerDNS-Admin/context:javascript)
7+
8+
#### Features:
9+
- Multiple domain management
10+
- Domain template
11+
- User management
12+
- User access management based on domain
13+
- User activity logging
14+
- Support Local DB / SAML / LDAP / Active Directory user authentication
15+
- Support Google / Github / Azure / OpenID OAuth
16+
- Support Two-factor authentication (TOTP)
17+
- Dashboard and pdns service statistics
18+
- DynDNS 2 protocol support
19+
- Edit IPv6 PTRs using IPv6 addresses directly (no more editing of literal addresses!)
20+
- Limited API for manipulating zones and records
21+
22+
## Running PowerDNS-Admin
23+
There are several ways to run PowerDNS-Admin. The easiest way is to use Docker.
24+
If you are looking to install and run PowerDNS-Admin directly onto your system check out the [Wiki](https://github.com/ngoduykhanh/PowerDNS-Admin/wiki#installation-guides) for ways to do that.
25+
26+
### Docker
27+
This are two options to run PowerDNS-Admin using Docker.
28+
To get started as quickly as possible try option 1. If you want to make modifications to the configuration option 2 may be cleaner.
29+
30+
#### Option 1: From Docker Hub
31+
The easiest is to just run the latest Docker image from Docker Hub:
32+
```
33+
$ docker run -d \
34+
-v pda-data:/data
35+
-p 9191:80 \
36+
ngoduykhanh/powerdns-admin:latest
37+
```
38+
This creates a volume called `pda-data` to persist the SQLite database with the configuration.
39+
40+
#### Option 2: Using docker-compose
41+
1. Update the configuration
42+
Edit the `docker-compose.yml` file to update the database connection string in `SQLALCHEMY_DATABASE_URI`.
43+
Other environment variables are mentioned in the [legal_envvars](https://github.com/ngoduykhanh/PowerDNS-Admin/blob/master/configs/docker_config.py#L5-L46).
44+
To use the Docker secrets feature it is possible to append `_FILE` to the environment variables and point to a file with the values stored in it.
45+
46+
2. Start docker container
47+
```
48+
$ docker-compose up
49+
```
50+
51+
You can then access PowerDNS-Admin by pointing your browser to http://localhost:9191.
52+
53+
## Screenshots
54+
![dashboard](https://user-images.githubusercontent.com/6447444/44068603-0d2d81f6-9fa5-11e8-83af-14e2ad79e370.png)
55+
56+
## LICENSE
57+
MIT. See [LICENSE](https://github.com/ngoduykhanh/PowerDNS-Admin/blob/master/LICENSE)
58+
59+
## Support
60+
If you like the project and want to support it, you can *buy me a coffee*
61+
62+
<a href="https://www.buymeacoffee.com/khanhngo" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

0 commit comments

Comments
 (0)