This repository contains all the code I will be referring to: https://github.com/milantimotijevic/serverless-tutorial-azure
I'm trying to setup a fully Dockerized localdev environment with Azure Functions and Azurite, however, Azure Functions do not get automatically reloaded when running in a docker container, even though the code is getting updated via docker volumes. It does reload if I run Azure Functions on the host machine, however.
Steps to reproduce (scenario where it DOES auto reload):
- Run "npm install" to install project dependencies
- Run "install -g azure-functions-core-tools@3 --unsafe-perm true" to install Azure Functions as a global package on the host machine
- Run "docker-compose up azurite" to only start Azurite (to enable queues, etc.)
- Run "npm start" to start Azure Functions on the host machine
- Edit MyQueueTrigger/index.js
Result: The terminal where you ran "npm start" will show that the "func" process is automatically restarted. Furthermore, if you make use of offline-resources/commands to create a queue and push a message into it, you will see that the changes are automatically applying.
Steps to reproduce (scenario where it DOESN'T auto reload):
- Run "docker-compose up" to start both services inside Docker containers
- Edit MyQueueTrigger/index.js
Expected: The terminal in which you ran "docker-compose up" should reflect a restart of the "func" process in the relevant container.
Actual: The process does not get restarted, even though the file is indeed getting changed. You can confirm this by SSHing into microservices-tutorial-azure and checking the file you changed - the change will be there (due to the docker volume).
My host machine is running Windows. I took the "recommended" image for the docker container. Anyone have any idea why the process refuses to restart when inside that container? Thanks in advance!