fixing default dns settings

This commit is contained in:
afeiszli 2021-08-11 12:19:28 -04:00
parent 684267e362
commit 1eb9decb15
3 changed files with 29 additions and 22 deletions

View file

@ -1,23 +1,19 @@
version: "3.4"
services:
mongodb:
image: mongo:4.2
ports:
- "27017:27017"
container_name: mongodb
volumes:
- mongovol:/data/db
rqlite:
container_name: rqlite
image: rqlite/rqlite
network_mode: host
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: mongoadmin
MONGO_INITDB_ROOT_PASSWORD: mongopass
volumes:
- sqldata:/rqlite/file/data
netmaker:
depends_on:
- rqlite
privileged: true
container_name: netmaker
depends_on:
- mongodb
image: gravitl/netmaker:v0.5
image: gravitl/netmaker:v0.7
volumes:
- ./:/local
- /etc/netclient:/etc/netclient
@ -33,18 +29,29 @@ services:
restart: always
network_mode: host
environment:
SERVER_HOST: "HOST_IP"
SERVER_HOST: "SERVER_PUBLIC_IP"
SERVER_API_CONN_STRING: "SERVER_PUBLIC_IP:8081"
SERVER_GRPC_CONN_STRING: "SERVER_PUBLIC_IP:50051"
COREDNS_ADDR: "SERVER_PUBLIC_IP"
GRPC_SSL: "off"
DNS_MODE: "on"
SERVER_HTTP_HOST: "SERVER_PUBLIC_IP"
SERVER_GRPC_HOST: "SERVER_PUBLIC_IP"
API_PORT: "8081"
GRPC_PORT: "50051"
MASTER_KEY: "REPLACE_MASTER_KEY"
CORS_ALLOWED_ORIGIN: "*"
netmaker-ui:
container_name: netmaker-ui
depends_on:
- netmaker
image: gravitl/netmaker-ui:v0.5
image: gravitl/netmaker-ui:v0.7
links:
- "netmaker:api"
ports:
- "80:80"
- "8082:80"
environment:
BACKEND_URL: "http://HOST_IP:8081"
BACKEND_URL: "https://api.NETMAKER_BASE_DOMAIN"
coredns:
depends_on:
- netmaker
@ -57,5 +64,5 @@ services:
volumes:
- dnsconfig:/root/dnsconfig
volumes:
mongovol: {}
sqldata: {}
dnsconfig: {}

View file

@ -120,7 +120,7 @@ func (node *Node) SetIsLocalDefault() {
func (node *Node) SetDNSOnDefault() {
if node.DNSOn == "" {
node.DNSOn = "no"
node.DNSOn = "yes"
}
}

View file

@ -147,10 +147,10 @@ func main() {
Usage: "Local Range if network is local, for instance 192.168.1.0/24.",
},
&cli.StringFlag{
Name: "dns",
Name: "dnson",
EnvVars: []string{"NETCLIENT_DNS"},
Value: "on",
Usage: "Sets private dns if 'on'. Ignores if 'off'. Will retrieve from network if unset.",
Value: "yes",
Usage: "Sets private dns if 'yes'. Ignores if 'no'. Will retrieve from network if unset.",
},
&cli.StringFlag{
Name: "islocal",