feat: init

This commit is contained in:
2025-05-12 13:09:43 +02:00
commit 516eb78832
12 changed files with 403 additions and 0 deletions

View File

@ -0,0 +1,41 @@
{
"version": 2,
"activeEnv": "",
"webServerPort": null,
"dnsServerPort": null,
"defaultDns": null,
"logLevel": null,
"logFile": null,
"registerContainerNames": null,
"hostMachineHostname": null,
"domain": "docker",
"dpsNetwork": true,
"dpsNetworkAutoConnect": true,
"resolvConfOverrideNameServers": false,
"noRemoteServers": true,
"noEntriesResponseCode": 2,
"remoteDnsServers": [],
"envs": [
{
"name": "",
"hostnames": [
{
"id": 1,
"hostname": ".vm",
"ip": "",
"target": "host.docker",
"ttl": 3600,
"type": "CNAME"
},
{
"id": 2,
"hostname": ".dev.local",
"ip": "",
"target": "host.docker",
"ttl": 3600,
"type": "CNAME"
}
]
}
]
},

25
config/dns/entrypoint.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
if [ ! -d "/app/conf" ]; then
mkdir /app/conf
fi
if [ ! -f "/app/conf/config.json" ]; then
cp /conf/config.sample.json /app/conf/config.json
elif [ "/conf/config.sample.json" -nt "/app/conf/config.json" ]; then
echo "example config file is newer than existing config."
echo "replacing existing file by new config"
CONFIG_BACKUP="/app/conf/config_$(date +"%Y%m%d_%H%M%s").json"
echo "saving existing config as ${CONFIG_BACKUP}"
cp /app/conf/config.json ${CONFIG_BACKUP}
cp /conf/config.sample.json /app/conf/config.json
fi
if [ -z "$@" ] ; then
exec "/app/dns-proxy-server" -XX:MaxHeapSize=50m -XX:MaxNewSize=10m
else
exec "$@"
fi