fix settings

This commit is contained in:
sadnub 2020-11-24 23:28:44 -05:00
parent fe3bf4b189
commit 2688a47436
4 changed files with 4 additions and 7 deletions

View File

@ -1,7 +1,6 @@
import json
import os
import subprocess
from tacticalrmm.settings import DOCKER_BUILD
import tldextract
from django.conf import settings
@ -19,7 +18,7 @@ def reload_nats():
for agent in agents:
users.append({"user": agent.agent_id, "password": agent.user.auth_token.key})
if not DOCKER_BUILD:
if not settings.DOCKER_BUILD:
tld = tldextract.extract(settings.ALLOWED_HOSTS[0])
domain = tld.domain + "." + tld.suffix
cert_path = f"/etc/letsencrypt/live/{domain}"
@ -39,5 +38,5 @@ def reload_nats():
with open(conf, "w") as f:
json.dump(config, f)
if not DOCKER_BUILD:
if not settings.DOCKER_BUILD:
subprocess.run(["/usr/local/bin/nats-server", "-signal", "reload"])

View File

@ -330,7 +330,6 @@ if not DEBUG:
)
})
NATS_HOST = "${rmmdomain}"
SALT_USERNAME = "saltapi"
SALT_PASSWORD = "${SALTPW}"
SALT_HOST = "127.0.0.1"

View File

@ -2,5 +2,4 @@ PROD_URL = "https://api.example.com"
DEV_URL = "https://api.example.com"
APP_URL = "https://app.example.com"
DEV_HOST = 0.0.0.0
DEV_PORT = 80
DOCKER_BUILD = false
DEV_PORT = 80

View File

@ -119,7 +119,7 @@ export default {
});
},
copyLink(props) {
const api = getBaseUrl;
const api = getBaseUrl();
copyToClipboard(`${api}/clients/${props.row.uid}/deploy/`).then(() => {
this.notifySuccess("Link copied to clipboard", 1500);
});