Fixed bug with app hotload
This commit is contained in:
@@ -18,3 +18,4 @@ functions/generated_apps
|
|||||||
|
|
||||||
backend/onprem/app_sdk/apps
|
backend/onprem/app_sdk/apps
|
||||||
*test.py
|
*test.py
|
||||||
|
shuffle-apps/*
|
||||||
|
|||||||
@@ -3499,6 +3499,8 @@ func handleAppHotloadRequest(resp http.ResponseWriter, request *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("Starting app hotloading")
|
||||||
|
|
||||||
// Just need to be logged in
|
// Just need to be logged in
|
||||||
// FIXME - should have some permissions?
|
// FIXME - should have some permissions?
|
||||||
user, err := handleApiAuthentication(resp, request)
|
user, err := handleApiAuthentication(resp, request)
|
||||||
@@ -3518,7 +3520,7 @@ func handleAppHotloadRequest(resp http.ResponseWriter, request *http.Request) {
|
|||||||
location := os.Getenv("APP_HOTLOAD_FOLDER")
|
location := os.Getenv("APP_HOTLOAD_FOLDER")
|
||||||
if len(location) == 0 {
|
if len(location) == 0 {
|
||||||
resp.WriteHeader(500)
|
resp.WriteHeader(500)
|
||||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "APP_HOTLOAD_FOLDER not specified in .env"}`, err)))
|
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "APP_HOTLOAD_FOLDER not specified in .env"}`)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3526,7 +3528,7 @@ func handleAppHotloadRequest(resp http.ResponseWriter, request *http.Request) {
|
|||||||
err = handleAppHotload(location)
|
err = handleAppHotload(location)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
resp.WriteHeader(500)
|
resp.WriteHeader(500)
|
||||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Failed loading apps: %s"}`, err)))
|
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Failed loading apps: %s"}`)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
build: ./frontend
|
#build: ./frontend
|
||||||
image: frikky/shuffle:frontend
|
image: frikky/shuffle:frontend
|
||||||
container_name: shuffle-frontend
|
container_name: shuffle-frontend
|
||||||
hostname: shuffle-frontend
|
hostname: shuffle-frontend
|
||||||
@@ -30,6 +30,7 @@ services:
|
|||||||
- ORG_ID=${ORG_ID}
|
- ORG_ID=${ORG_ID}
|
||||||
- DATASTORE_EMULATOR_HOST=shuffle-database:8000
|
- DATASTORE_EMULATOR_HOST=shuffle-database:8000
|
||||||
- APP_DOWNLOAD_LOCATION=${APP_DOWNLOAD_LOCATION}
|
- APP_DOWNLOAD_LOCATION=${APP_DOWNLOAD_LOCATION}
|
||||||
|
- APP_HOTLOAD_FOLDER=/shuffle-apps
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
|
|||||||
Reference in New Issue
Block a user