Compare commits
1 Commits
master
...
add-powerd
Author | SHA1 | Date | |
---|---|---|---|
e7af96ec36 |
7
cloudron-powerdns/.dockerignore
Normal file
7
cloudron-powerdns/.dockerignore
Normal file
@ -0,0 +1,7 @@
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
docker-compose.yml
|
||||
node_modules
|
||||
helpers/*
|
||||
runner/*
|
5
cloudron-powerdns/.gitignore
vendored
Normal file
5
cloudron-powerdns/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
.env
|
||||
runner/.env
|
||||
secrets.txt
|
||||
.tags
|
||||
.vscode/*
|
36
cloudron-powerdns/CloudronManifest.json
Normal file
36
cloudron-powerdns/CloudronManifest.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"version": "0.0.1",
|
||||
"id": "com.powerdns.authoritative.cloudronapp",
|
||||
"icon": "file://logo.png",
|
||||
"healthCheckPath": "/",
|
||||
"httpPort": 3000,
|
||||
"tcpPorts": {
|
||||
"DNS_TCP_PORT": {
|
||||
"title": "TCP DNS Port",
|
||||
"description": "TCP Port over which DNS requests are made",
|
||||
"containerPort": 53,
|
||||
"defaultValue": 53
|
||||
}
|
||||
},
|
||||
"udpPorts": {
|
||||
"DNS_UDP_PORT": {
|
||||
"title": "UDP DNS Port",
|
||||
"description": "UDP Port over which DNS requests are made",
|
||||
"containerPort": 53,
|
||||
"defaultValue": 53
|
||||
}
|
||||
},
|
||||
"addons": {
|
||||
"localstorage": {}
|
||||
},
|
||||
"minBoxVersion": "7.1.2",
|
||||
"manifestVersion": 2,
|
||||
"website": "https://doc.powerdns.com/authoritative/",
|
||||
"title": "PowerDNS Authoritative DNS",
|
||||
"author": "PowerDNS developers",
|
||||
"tagline": "Independent hosting of DNS domains",
|
||||
"tags": [
|
||||
"dns"
|
||||
],
|
||||
"documentationUrl": "https://doc.powerdns.com/authoritative/"
|
||||
}
|
18
cloudron-powerdns/Dockerfile
Normal file
18
cloudron-powerdns/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
|
||||
|
||||
EXPOSE 8080 53
|
||||
|
||||
RUN apt-get install pdns-server pdns-backend-sqlite3 && \
|
||||
mkdir -p /app/pkg/dist && \
|
||||
curl --proto '=https' --tlsv1.2 -sSfL \https://github.com/james-stevens/powerdns-webui/raw/2d1a8c5a305f0534d49bf2c8be9a329458ae2fd6/htdocs/index.html \
|
||||
-o /app/pkg/static/index.html
|
||||
|
||||
RUN sed -e 's,^logfile=.*$,logfile=/run/supervisord.log,' -i /etc/supervisor/supervisord.conf
|
||||
ADD setup/config/ /etc
|
||||
|
||||
COPY start.sh /app/pkg/
|
||||
COPY setup/data /app/pkg/data
|
||||
|
||||
WORKDIR /app/data
|
||||
|
||||
CMD [ "/app/pkg/start.sh" ]
|
45
cloudron-powerdns/Makefile
Normal file
45
cloudron-powerdns/Makefile
Normal file
@ -0,0 +1,45 @@
|
||||
CLOUDRON_APP ?= powerdns
|
||||
CLOUDRON_ID := $(shell jq -r .id CloudronManifest.json)
|
||||
CLOUDRON_SERVER ?= my.kiers.eu
|
||||
#CLOUDRON_TOKEN ?=123
|
||||
DOCKER_REPO ?= jacobkiers
|
||||
CLOUDRON ?= cloudron
|
||||
|
||||
.PHONY: default
|
||||
default: build update
|
||||
|
||||
.PHONY: init
|
||||
init:
|
||||
${CLOUDRON} init
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
${CLOUDRON} build --set-repository $(DOCKER_REPO)/$(CLOUDRON_ID)
|
||||
|
||||
.PHONY: update
|
||||
update: build
|
||||
${CLOUDRON} update --server ${CLOUDRON_SERVER} --app ${CLOUDRON_APP}
|
||||
|
||||
.PHONY: update-ci
|
||||
update-ci:
|
||||
${CLOUDRON} update --server ${CLOUDRON_SERVER} --app ${CLOUDRON_APP}
|
||||
|
||||
.PHONY: install
|
||||
install: build
|
||||
${CLOUDRON} install --location ${CLOUDRON_APP}
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
${CLOUDRON} uninstall --app ${CLOUDRON_APP}
|
||||
|
||||
.PHONY: install-debug
|
||||
install-debug:
|
||||
${CLOUDRON} install --location ${CLOUDRON_APP} --debug
|
||||
|
||||
.PHONY: exec
|
||||
exec:
|
||||
${CLOUDRON} exec --app ${CLOUDRON_APP}
|
||||
|
||||
.PHONY: logs
|
||||
logs:
|
||||
${CLOUDRON} logs -f --app ${CLOUDRON_APP}
|
5
cloudron-powerdns/README.md
Normal file
5
cloudron-powerdns/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Cloudron Headscale
|
||||
|
||||
This is the repository to create a headscale server for cloudron.
|
||||
|
||||
|
BIN
cloudron-powerdns/logo.png
Normal file
BIN
cloudron-powerdns/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,19 @@
|
||||
client_body_temp_path /run/client_body;
|
||||
proxy_temp_path /run/proxy_temp;
|
||||
fastcgi_temp_path /run/fastcgi_temp;
|
||||
scgi_temp_path /run/scgi_temp;
|
||||
uwsgi_temp_path /run/uwsgi_temp;
|
||||
|
||||
server {
|
||||
listen 3000;
|
||||
|
||||
root /app/code/static;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 86400;
|
||||
}
|
||||
}
|
10
cloudron-powerdns/setup/config/supervisor/conf.d/nginx.conf
Normal file
10
cloudron-powerdns/setup/config/supervisor/conf.d/nginx.conf
Normal file
@ -0,0 +1,10 @@
|
||||
[program:nginx]
|
||||
directory=/tmp
|
||||
command=/usr/sbin/nginx -g "daemon off;"
|
||||
user=root
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
@ -0,0 +1,10 @@
|
||||
[program:powerdns-server]
|
||||
command=/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no --config-dir=/app/data/config/pdns.conf
|
||||
directory=/app/data
|
||||
user=cloudron
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
17
cloudron-powerdns/setup/data/README.md
Normal file
17
cloudron-powerdns/setup/data/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# PowerDNS Authoritative Server
|
||||
|
||||
Hey there!
|
||||
|
||||
This app contains a [PowerDNS Authoritative DNS server](https://doc.powerdns.com/authoritative/).
|
||||
With this, you have the full power of PowerDNS at your fingertips.
|
||||
|
||||
By default, it is configured as a primary server. The configuration is stored
|
||||
in the file called `/app/data/config/pdns.conf` and the `pdns.d` subdirectory.
|
||||
|
||||
After you have made changes to it you can restart just powerdns-server by running
|
||||
`supervisorctl restart powerdns-server`.
|
||||
|
||||
It uses the sqlite3 backend, and has an administrative web interface. For
|
||||
security purposes this is disabled by default. In order to use the admin
|
||||
interface, you must change the webserver and api settings in the
|
||||
`01-api.conf` file.
|
11
cloudron-powerdns/setup/data/config/pdns.conf
Normal file
11
cloudron-powerdns/setup/data/config/pdns.conf
Normal file
@ -0,0 +1,11 @@
|
||||
#################################
|
||||
# include-dir Include *.conf files from this directory
|
||||
#
|
||||
# include-dir=
|
||||
include-dir=/app/data/config/pdns.d
|
||||
|
||||
#################################
|
||||
# launch Which backends to launch and order to query them in
|
||||
#
|
||||
# launch=
|
||||
launch=
|
16
cloudron-powerdns/setup/data/config/pdns.d/00-pdns.conf
Normal file
16
cloudron-powerdns/setup/data/config/pdns.d/00-pdns.conf
Normal file
@ -0,0 +1,16 @@
|
||||
local-address=::1,0.0.0.0
|
||||
|
||||
primary=yes
|
||||
version-string=anonymous
|
||||
|
||||
allow-axfr-ips=127.0.0.0/8,::1,2a02:a470:2cda::/48,2a01:4f8:c17:7865::/64,2607:7c80:54:6::53,204.87.183.53
|
||||
allow-dnsupdate-from=127.0.0.0/8,::1,fe80::/10,2a02:a470:2cda::/48
|
||||
|
||||
default-soa-content=dns.home.kie.rs hostmaster.@ 0 10800 3600 604800 3600
|
||||
default-soa-edit=INCEPTION-INCREMENT
|
||||
|
||||
launch+=gsqlite3
|
||||
gsqlite3-database=/app/data/db/pdns.sqlite3
|
||||
gsqlite3-dnssec=yes
|
||||
|
||||
|
27
cloudron-powerdns/setup/data/config/pdns.d/01-api.conf
Normal file
27
cloudron-powerdns/setup/data/config/pdns.d/01-api.conf
Normal file
@ -0,0 +1,27 @@
|
||||
# Webserver and API configuration
|
||||
|
||||
# In order to enable the administrative interface, make sure that the
|
||||
# following three keys are updated.
|
||||
#
|
||||
# Generate a secure API key with the following command:
|
||||
# `LC_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c32`
|
||||
#
|
||||
# This API key is also the password for the web interface.
|
||||
webserver=no
|
||||
api=no
|
||||
api-key=HereYourSuperSecureApiKeyWhichIsAlsoThePasswordForTheAdminInterface
|
||||
|
||||
|
||||
# Listen address for the webserver. Defaults to everywhere, so the API can reach it.
|
||||
webserver-address=0.0.0.0
|
||||
|
||||
# The webserver port to listen on. Do not change this.
|
||||
webserver-port=8082
|
||||
|
||||
# Where to allow requests from. Basic firewall.
|
||||
# Update this to allow the API to work.
|
||||
webserver-allow-from=127.0.0.0/8,::1,fe80::/10,0.0.0.0/0,::/0
|
||||
|
||||
# Controls the verbosity of webserver logging
|
||||
# Accepted values: none, normal, detailed
|
||||
webserver-loglevel=normal
|
@ -0,0 +1,5 @@
|
||||
loglevel=5
|
||||
|
||||
log-dns-details=yes
|
||||
log-dns-queries=yes
|
||||
log-timestamp=yes
|
12
cloudron-powerdns/start.sh
Normal file
12
cloudron-powerdns/start.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
if [ ! -e /app/data/README.md ]; then
|
||||
cp -dvpR /app/pkg/data/ /app/data
|
||||
fi
|
||||
|
||||
echo "=> Ensure permissions"
|
||||
chown -R cloudron:cloudron /run /app/data
|
||||
|
||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon
|
Loading…
Reference in New Issue
Block a user