coding-coach-api icon indicating copy to clipboard operation
coding-coach-api copied to clipboard

Add Docker

Open davisokoth opened this issue 5 years ago • 5 comments

This PR adds Docker for development purposes

davisokoth avatar May 13 '19 15:05 davisokoth

This is great! No need to install azure in our local anymore, I will try to run it on my local before approving.

Could you fix the conflicts? Thanks!

crysfel avatar May 13 '19 17:05 crysfel

We should make sure it works with this: https://code.visualstudio.com/docs/remote/containers !

swissarmykirpan avatar May 14 '19 10:05 swissarmykirpan

We should make sure it works with this: https://code.visualstudio.com/docs/remote/containers !

Alright. Let me see to that!

davisokoth avatar May 19 '19 19:05 davisokoth

@davisokoth Awesome! I tested in my local and I didn't have any issues when running docker-compose up, it seems like it works fine.

The only thing I'm seeing is when calling any of the endpoints, I'm getting this error:

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.add-user ---> Microsoft.Azure.WebJobs.Script.Rpc.RpcException: Result: Failure
coding-coach-api_1  | Exception: Worker was unable to load function add-user: 'Error: Cannot find module '@repositories/user-repository''
coding-coach-api_1  | Stack: Error: Cannot find module '@repositories/user-repository'
coding-coach-api_1  |     at Function.Module._resolveFilename (module.js:548:15)
coding-coach-api_1  |     at Function.Module._load (module.js:475:25)
coding-coach-api_1  |     at Module.require (module.js:597:17)
coding-coach-api_1  |     at require (internal/module.js:11:18)
coding-coach-api_1  |     at Object.<anonymous> (/home/node/app/dist/handlers/add-user/add-user-handler.js:29:27)
coding-coach-api_1  |     at Module._compile (module.js:653:30)
coding-coach-api_1  |     at Object.Module._extensions..js (module.js:664:10)
coding-coach-api_1  |     at Module.load (module.js:566:32)
coding-coach-api_1  |     at tryModuleLoad (module.js:506:12)
coding-coach-api_1  |     at Function.Module._load (module.js:498:3)
coding-coach-api_1  |    at Microsoft.Azure.WebJobs.Script.Description.WorkerLanguageInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\Rpc\WorkerLanguageInvoker.cs:line 74

It seems like is not loading this module @repositories/user-repository, which TS should resolve.

crysfel avatar May 20 '19 16:05 crysfel

@davisokoth Awesome! I tested in my local and I didn't have any issues when running docker-compose up, it seems like it works fine.

The only thing I'm seeing is when calling any of the endpoints, I'm getting this error:

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.add-user ---> Microsoft.Azure.WebJobs.Script.Rpc.RpcException: Result: Failure
coding-coach-api_1  | Exception: Worker was unable to load function add-user: 'Error: Cannot find module '@repositories/user-repository''
coding-coach-api_1  | Stack: Error: Cannot find module '@repositories/user-repository'
coding-coach-api_1  |     at Function.Module._resolveFilename (module.js:548:15)
coding-coach-api_1  |     at Function.Module._load (module.js:475:25)
coding-coach-api_1  |     at Module.require (module.js:597:17)
coding-coach-api_1  |     at require (internal/module.js:11:18)
coding-coach-api_1  |     at Object.<anonymous> (/home/node/app/dist/handlers/add-user/add-user-handler.js:29:27)
coding-coach-api_1  |     at Module._compile (module.js:653:30)
coding-coach-api_1  |     at Object.Module._extensions..js (module.js:664:10)
coding-coach-api_1  |     at Module.load (module.js:566:32)
coding-coach-api_1  |     at tryModuleLoad (module.js:506:12)
coding-coach-api_1  |     at Function.Module._load (module.js:498:3)
coding-coach-api_1  |    at Microsoft.Azure.WebJobs.Script.Description.WorkerLanguageInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\Rpc\WorkerLanguageInvoker.cs:line 74

It seems like is not loading this module @repositories/user-repository, which TS should resolve.

Am still not sure how to fix this. Any pointers?

davisokoth avatar Jun 19 '19 14:06 davisokoth