You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+8-2
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The solution has to meet some requirements, which I didn'd found in the amount o
15
15
* configuration of hosts and domain allowed to update
16
16
* items like access keys, hosts, domains should not be hard-coded to keep flexible
17
17
18
-
It would have been easy to write a PHP script to handle the HTTP request, read and write database items and so on. But wait - when using PHP (or Perl, or Python...) in a Docker image, the image has to contain the whole bunch of runtime infrastructure like a webserver to handle the requests (when not using the "development" webserver integrated in PHP), PHP-FPM and the script itself. In my opinion this was exaggerated for this small task.
18
+
It would have been easy to write a PHP script to handle the HTTP request, read and write database items and so on. But wait - when using PHP (or Perl, or Python...) in a Docker image, the image has to contain the whole bunch of runtime infrastructure like a webserver to handle the requests (when not using the "development" webserver integrated in PHP), PHP-FPM and the script itself. In my opinion this was exaggerated for this small task.
19
19
20
20
Since I wanted to deal with Golang for quite some time, this task was the perfect way to start. So I created the dynpower server module which handles the HTTP request and updates the database after checking the permissions. After this was running, I thought that would be a nice add-on to manage the configuration by a CLI tool. So dynpower-cli was written, it can list, add and delete domain and host entries.
21
21
@@ -26,11 +26,17 @@ And thanks to the static binding of Go binaries and Docker multi-stage build, th
26
26
* PowerDNS Authoritative Server with MySQL/MariaDB backend
27
27
* access to PowerDNS database server
28
28
29
+
Dynpower needs a MySQL/MariaDB database to store domain and host data. So it's necessary to create a database with its access data at first. See dynpower.sql for the table definition.
30
+
31
+
If you're using the Docker image of MariaDB, you can place the dump file dynpower.sql in any directory which has to be mounted into the container. When starting the container, MariaDB executes files with extensions .sh, .sql and .sql.gz and creates the corresponding tables. See example in the docker-compose file below.
32
+
33
+
If you don't use Docker, please create a database and add a user with its grant permissions, so it is able to add and modify items. Then just import dynpower.sql to the database (e.g. ```mysql dynpower < ./sql/dynpower.sql```)
34
+
29
35
## Usage
30
36
31
37
It is recommended to use the dynpower Docker image. It comes with dynpower running as server and the dynpower CLI to manage its database entries.
32
38
33
-
Coming soon, I promise! Sorry, I'm ugly slow in writing this kind of documentation. ;-)
39
+
Coming soon, I promise! Sorry, I'm terrible slow in writing this kind of documentation. ;-)
0 commit comments