Product: PowerShell Universal
Version: 4.2.9
I’m new to PowerShell Universal and am in the 14-day trial period. I’m trying to get it up and running in an Azure web app. I’m sure I’m missing something obvious, but I am following the Azure guide in the docs. I’m using the tagged container from Docker Hub: ironmansoftware/universal:4.2.9-ubuntu-20.04
When I let it run at first, it appears to work. However, I want to enable SQL and have set up an Azure SQL db which I’m authenticating against with a System Managed Identity. Here is my connection string: Server=<insert host>.database.windows.net;Database=<insert db name>;Encrypt=True;Connection Timeout=10;Authentication=Active Directory Managed Identity;
Again, this appears to work properly and I see the tables being created, I can log in, etc.
What I’m not understanding is how to persist data. When I add the WEBSITES_ENABLE_APP_SERVICE_STORAGE
env to my web app configuration, the app ceases to run. I saw there was an option to use Azure Files but it is not recommended if you’re using git which I intend to.
To sum up, I think I’m close, but I can’t seem to nail the data persistence. Do I even need that if SQL is involved? Just want to make sure this setup is “production-ready” so I can finish testing it during our trial.
This is the env variables that I’ve got set in the app configuration:
[
{
"name": "ASPNETCORE_FORWARDEDHEADERS_ENABLED",
"value": "true",
"slotSetting": false
},
{
"name": "Data__ConnectionString",
"value": "Server=<insert host>.database.windows.net;Database=<insert db name>;Encrypt=True;Connection Timeout=10;Authentication=Active Directory Managed Identity;",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "https://index.docker.io/v1",
"slotSetting": false
},
{
"name": "NodeName",
"value": "<insert node name>",
"slotSetting": false
},
{
"name": "Plugins__0",
"value": "SQL",
"slotSetting": false
},
{
"name": "TZ",
"value": "America/New_York",
"slotSetting": false
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "true",
"slotSetting": false
},
{
"name": "WEBSITES_PORT",
"value": "5000",
"slotSetting": false
}
]
I also have set the web app to “always on” which I read on one forum post.
Any help would be appreciated!