Merge pull request #216 from gravitl/v0.7.1_hotfix

fixing default dns settings
This commit is contained in:
Alex 2021-08-11 12:21:05 -04:00 committed by GitHub
commit c79be72561
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 22 deletions

View file

@ -1,23 +1,19 @@
version: "3.4" version: "3.4"
services: services:
mongodb: rqlite:
image: mongo:4.2 container_name: rqlite
ports: image: rqlite/rqlite
- "27017:27017" network_mode: host
container_name: mongodb
volumes:
- mongovol:/data/db
restart: always restart: always
environment: volumes:
MONGO_INITDB_ROOT_USERNAME: mongoadmin - sqldata:/rqlite/file/data
MONGO_INITDB_ROOT_PASSWORD: mongopass
netmaker: netmaker:
depends_on:
- rqlite
privileged: true privileged: true
container_name: netmaker container_name: netmaker
depends_on: image: gravitl/netmaker:v0.7
- mongodb
image: gravitl/netmaker:v0.5
volumes: volumes:
- ./:/local - ./:/local
- /etc/netclient:/etc/netclient - /etc/netclient:/etc/netclient
@ -33,18 +29,29 @@ services:
restart: always restart: always
network_mode: host network_mode: host
environment: 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: netmaker-ui:
container_name: netmaker-ui container_name: netmaker-ui
depends_on: depends_on:
- netmaker - netmaker
image: gravitl/netmaker-ui:v0.5 image: gravitl/netmaker-ui:v0.7
links: links:
- "netmaker:api" - "netmaker:api"
ports: ports:
- "80:80" - "8082:80"
environment: environment:
BACKEND_URL: "http://HOST_IP:8081" BACKEND_URL: "https://api.NETMAKER_BASE_DOMAIN"
coredns: coredns:
depends_on: depends_on:
- netmaker - netmaker
@ -57,5 +64,5 @@ services:
volumes: volumes:
- dnsconfig:/root/dnsconfig - dnsconfig:/root/dnsconfig
volumes: volumes:
mongovol: {} sqldata: {}
dnsconfig: {} dnsconfig: {}

View file

@ -120,7 +120,7 @@ func (node *Node) SetIsLocalDefault() {
func (node *Node) SetDNSOnDefault() { func (node *Node) SetDNSOnDefault() {
if node.DNSOn == "" { 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.", Usage: "Local Range if network is local, for instance 192.168.1.0/24.",
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "dns", Name: "dnson",
EnvVars: []string{"NETCLIENT_DNS"}, EnvVars: []string{"NETCLIENT_DNS"},
Value: "on", Value: "yes",
Usage: "Sets private dns if 'on'. Ignores if 'off'. Will retrieve from network if unset.", Usage: "Sets private dns if 'yes'. Ignores if 'no'. Will retrieve from network if unset.",
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "islocal", Name: "islocal",