1

I successfully deployed a fastAPI onto Azure App Services.

However, the environmental variables that I specified into the Configurations > App Settings pane got unexpectedly deleted, thus preventing my app from running correctly and I had to manually recreate the application settings from scratch.enter image description here

I could save these settings onto my local computer but I am wondering if there is a better way to archive these environment variables.

1 Answer 1

1

Ideally, you would be injecting these via an appsettings.json, Key Vault reference or something and not manually setting these in the Configuration panel itself. In terms of archiving the actual values etc, this is probably most easily accomplished via the App Service API. There are several CRUD operations that can GET, UPDATE, etc configurations/application settings which should be able to allow you to accomplish what you have asked here.

2
  • Thanks for your answer. Should the appsettings.json be stored in the repo where the Python scripts are hosted?
    – Sheldon
    Commented Oct 12, 2022 at 19:49
  • There seem to be a couple ways Fast API does this - settings
    – jsprovoke
    Commented Oct 13, 2022 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.