Minor SDK update for prints
This commit is contained in:
@@ -46,15 +46,17 @@ OUTER_HOSTNAME=shuffle-backend
|
|||||||
DB_LOCATION=./shuffle-database
|
DB_LOCATION=./shuffle-database
|
||||||
DOCKER_API_VERSION=1.40
|
DOCKER_API_VERSION=1.40
|
||||||
|
|
||||||
# Proxy configurations. SHUFFLE_PASS_WORKER_PROXY must be FALSE to not pass the proxy information to sub-apps.
|
# Orborus/Proxy configurations
|
||||||
# PS: It will skip proxy for
|
|
||||||
HTTP_PROXY=
|
HTTP_PROXY=
|
||||||
HTTPS_PROXY=
|
HTTPS_PROXY=
|
||||||
SHUFFLE_PASS_WORKER_PROXY=TRUE
|
SHUFFLE_PASS_WORKER_PROXY=TRUE # Decides if proxy configurations should be passed to workers or not
|
||||||
SHUFFLE_PASS_APP_PROXY=FALSE
|
SHUFFLE_PASS_APP_PROXY=TRUE # Decides if proxy configurations should be passed to apps or not. Requires SHUFFLE_PASS_WORKER_PROXY=true
|
||||||
|
SHUFFLE_INTERNAL_HTTP_PROXY= # Used to differentiate proxies for shuffle internal vs external traffic
|
||||||
|
SHUFFLE_INTERNAL_HTTPS_PROXY=
|
||||||
TZ=Europe/Amsterdam # Timezone-handler in Orborus, Worker and Apps
|
TZ=Europe/Amsterdam # Timezone-handler in Orborus, Worker and Apps
|
||||||
ORBORUS_CONTAINER_NAME= # Used to FIND the containername. cgroup v2: issue 501
|
ORBORUS_CONTAINER_NAME= # Used to FIND the containername. cgroup v2: issue 501
|
||||||
SHUFFLE_ORBORUS_STARTUP_DELAY= # Used for setting up a startup delay for Orborus
|
SHUFFLE_ORBORUS_STARTUP_DELAY= # Used for setting up a startup delay for Orborus
|
||||||
|
SHUFFLE_SKIPSSL_VERIFY=true
|
||||||
IS_KUBERNETES=false # Used for controlling if the environment should run in kubernetes or not
|
IS_KUBERNETES=false # Used for controlling if the environment should run in kubernetes or not
|
||||||
|
|
||||||
SHUFFLE_BASE_IMAGE_NAME=shuffle
|
SHUFFLE_BASE_IMAGE_NAME=shuffle
|
||||||
|
|||||||
@@ -2691,7 +2691,7 @@ class AppBase:
|
|||||||
#self.logger.info(f"\n\nType of value: {type(value)}")
|
#self.logger.info(f"\n\nType of value: {type(value)}")
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
# Could we take it here?
|
# Could we take it here?
|
||||||
self.logger.info(f"[DEBUG] Got value %s for parameter {paramname}" % value)
|
#self.logger.info(f"[DEBUG] Got value %s for parameter {paramname}" % value)
|
||||||
# Should check if there is are quotes infront of and after the to_be_replaced
|
# Should check if there is are quotes infront of and after the to_be_replaced
|
||||||
# If there are, then we need to sanitize the value
|
# If there are, then we need to sanitize the value
|
||||||
# 1. Look for the to_be_replaced in the data
|
# 1. Look for the to_be_replaced in the data
|
||||||
@@ -2703,7 +2703,6 @@ class AppBase:
|
|||||||
# value = returnvalue
|
# value = returnvalue
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
parameter["value"] = parameter["value"].replace(to_be_replaced, value)
|
parameter["value"] = parameter["value"].replace(to_be_replaced, value)
|
||||||
elif isinstance(value, dict) or isinstance(value, list):
|
elif isinstance(value, dict) or isinstance(value, list):
|
||||||
# Changed from JSON dump to str() 28.05.2021
|
# Changed from JSON dump to str() 28.05.2021
|
||||||
|
|||||||
@@ -3049,55 +3049,7 @@ func verifySwagger(resp http.ResponseWriter, request *http.Request) {
|
|||||||
buildSwaggerApp(resp, body, user, false)
|
buildSwaggerApp(resp, body, user, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates osfs from folderpath with a basepath as directory base
|
|
||||||
func createFs(basepath, pathname string) (billy.Filesystem, error) {
|
|
||||||
log.Printf("[INFO] MemFS base: %s, pathname: %s", basepath, pathname)
|
|
||||||
|
|
||||||
fs := memfs.New()
|
|
||||||
err := filepath.Walk(pathname,
|
|
||||||
func(path string, info os.FileInfo, err error) error {
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if strings.Contains(path, ".git") {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fix the inner path here
|
|
||||||
newpath := strings.ReplaceAll(path, pathname, "")
|
|
||||||
fullpath := fmt.Sprintf("%s%s", basepath, newpath)
|
|
||||||
switch mode := info.Mode(); {
|
|
||||||
case mode.IsDir():
|
|
||||||
err = fs.MkdirAll(fullpath, 0644)
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("Failed making folder: %s", err)
|
|
||||||
}
|
|
||||||
case mode.IsRegular():
|
|
||||||
srcData, err := ioutil.ReadFile(path)
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("Src error: %s", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
dst, err := fs.Create(fullpath)
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("Dst error: %s", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = dst.Write(srcData)
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("Dst write error: %s", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
|
|
||||||
return fs, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hotloads new apps from a folder
|
// Hotloads new apps from a folder
|
||||||
func handleAppHotload(ctx context.Context, location string, forceUpdate bool) error {
|
func handleAppHotload(ctx context.Context, location string, forceUpdate bool) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user