@darh
Here are the corteza server logs
corteza_backend_1 | {"level":"info","ts":1663860923.5565093,"logger":"http.rest","msg":"HTTP request POST /corteza/api/automation/workflows/302915990323232772/exec","requestID":"744f55b14071/LWcqCB1NmV-000049","method":"POST","path":"/corteza/api/automation/workflows/302915990323232772/exec","size":25,"remote":"172.26.0.1"}
corteza_backend_1 | {"level":"debug","ts":1663860923.560177,"logger":"workflow.session","msg":"state change handler","sessionID":303050415350480900,"status":"active","workflowID":302915990323232772}
corteza_backend_1 | {"level":"info","ts":1663860923.8108017,"logger":"http.rest","msg":"HTTP response POST /corteza/api/automation/workflows/302915990323232772/exec","requestID":"744f55b14071/LWcqCB1NmV-000049","method":"POST","path":"/corteza/api/automation/workflows/302915990323232772/exec","status":200,"size":105,"duration":0.254254576}
The corredor server itself has no logs from the request, but here are the logs it outputs on setup
~/repos/region-corteza/corteza_corredor_config$ docker logs $(docker container ls --filter=ancestor=corteza_corteza_corredor --quiet) --follow
{"level":20,"time":1663847112790,"name":"check","apiBaseURL":"http://corteza_backend:8080/system","msg":"configuring cServer system API","v":1}
{"level":20,"time":1663847112791,"name":"check","apiBaseURL":"http://corteza_backend:8080/compose","msg":"configuring cServer compose API","v":1}
{"level":30,"time":1663847112800,"name":"check","msg":"checking API endpoints","v":1}
{"level":20,"time":1663847112800,"name":"check","baseURL":"https://dfda89ec0218","msg":"frontend settings","v":1}
{"level":30,"time":1663847112801,"name":"check","output":"/tmp/corredor/bundler-dist","msg":"making bundler output directory","v":1}
{"level":20,"time":1663847112801,"name":"check","output":"/tmp/corredor/bundler-dist","msg":"bundler enabled","v":1}
{"level":20,"time":1663847112801,"name":"services.client-scripts","msg":"initializing","v":1}
{"level":20,"time":1663847112801,"name":"services.server-scripts","msg":"initializing","v":1}
{"level":20,"time":1663847112802,"name":"services.dependencies","msg":"initializing","v":1}
{"level":30,"time":1663847112802,"name":"services.dependencies","msg":"initializing watcher","v":1}
{"level":30,"time":1663847112811,"name":"services.server-scripts","searchPaths":["/corredor/usr/*","/corredor/usr","/corredor/corre/extensions","/extensions/*"],"msg":"reloading server scripts","v":1}
{"level":30,"time":1663847112815,"name":"services.client-scripts","searchPaths":["/corredor/usr/*","/corredor/usr","/corredor/corre/extensions","/extensions/*"],"msg":"reloading client scripts","v":1}
{"level":30,"time":1663847112825,"name":"services.client-scripts","valid":0,"total":0,"msg":"processed","v":1}
{"level":30,"time":1663847113008,"name":"services.server-scripts","valid":1,"total":1,"msg":"processed","v":1}
{"level":30,"time":1663847113013,"name":"check","buildTime":"2022-09-22T11:45:09Z","version":"2022.9.0-dev.2","msg":"Assuming valid Corteza API at http://corteza_backend:8080/system","v":1}
{"level":20,"time":1663847113036,"name":"gRPC","msg":"starting server","v":1}
{"level":30,"time":1663847113036,"name":"gRPC","msg":"server running at 0.0.0.0:80","v":1}
{"level":20,"time":1663847115132,"name":"gRPC.ServerScripts","name":"grpc.server-scripts","rpc":"List","filter":{},"total":1,"msg":"returning list of server scripts","v":1}
{"level":20,"time":1663847115147,"name":"gRPC.ClientScripts","name":"grpc.client-scripts","rpc":"List","filter":{},"total":0,"msg":"returning list of client scripts","v":1}
This is the hello world script
export default {
label: "hello-world-server",
description: "A sample server automation script",
// Use the ones you need, delete the rest
triggers ({ before, after, on, at }) {
return on('manual').for('system');
},
// remove async if you aren't doing any async operations
// use object destructuring for args and ctx
async exec(args,ctx) {
console.log("Hello, world!");
console.log(args);
console.log(ctx);
logger.info('success')
},
}