azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

How to pass parameters to Azurite Storage emulator when running from an Azure Functions project? ...

Open bdcoder2 opened this issue 2 years ago • 1 comments

According the documentation, under the heading "Running Azurite from an Azure Functions project", it states:

After you create the project, Azurite starts automatically.

Which is fine -- but what if I want / need to set the location, listening ports or log to something other than the defaults?

(Yes, I know I can start the emulator via the command line and specify a location using the command line).

However, is there any parameter file that the Azurite emulator uses to set the default location, (currently, the default location seems to be: "C:\Users\Administrator\AppData\Local\Temp\Azurite"), listening ports, ip addresses, log file path, etc.?

For example, is there a section we can add to local.settings.json, something along the lines of:

{ ...

  "Azurite": {
    "Location": "D:\temp",
    "blobPort": "8888",
    "debug": "D:\temp\debug.log"
  }

}

or perhaps a separate JSON file (azurite.json) could be added to the project so when the emulator starts up, command line options would be read from that file?

Alternatively (I haven't tried yet) but is it possible to start the Azurite emulator BEFORE opening the project (as opening the project starts the emulator) -- in that case, will a second instance of the emulator be started and a mushroom cloud ensue?! ...

If the documentation page could be updated with workarounds for the above, it would be most helpful.

Thanks in advance.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

bdcoder2 avatar Oct 16 '22 21:10 bdcoder2

@bdcoder2 Thanks for your feedback! We will investigate and update as appropriate.

YashikaTyagii avatar Oct 17 '22 03:10 YashikaTyagii

@bdcoder2

  1. Visual Studio currently doesn’t expose the configurations to Azurite instance managed by Visual Studio. Please check with Visual Studio on the details of feature ask.
  2. It’s able to start Azurite "Before"opening Visual Studio project and listening on different ports. If no ports conflict, 2nd Azurite instance can be started. We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

SumanthMarigowda avatar Oct 19 '22 02:10 SumanthMarigowda