Unfortunately not able to make it persistant in Azure as of now (no time) the guide above works fine for a local container repository, but having the data on the c: for the image in azure makes no difference here, the data is not persitent. I guess you have to mount / add a Azure file share, and that looks to be only supported on Linux images. Workaround here might be a net use z: … to an azure file share, but have not gotten that to work yet.
Bummer. I’m going to take another stab at this. It sounds like the docker image may not work like I was hoping. Maybe I can get it working as standard web app.
I’m struggling with this myself. Just to provide some insight into what’s going on: https://docs.microsoft.com/en-us/answers/questions/94633/aspnet-core-31-site-in-azure-never-loads.html
I’ll keep you posted as soon as I find a solution. I may try to work with the docker instance to see if I can get it behaving correctly instead of fighting the code-based web app but we’ll see if I get any answers today.
Yeah, it was a tough one
Another thing by running it as an web app / docker image, how could you do scheduling here through the UA? As the images would be “fresh” from time to time.
Maybe you have to post a “finished” image with all code included, and keep the scheduling outside in another solution, such as Azure Kubernetes services. Have not worked enough with it, and really not my field, but very interesting area now that I have tried this
I could spin the solution up in Azure, as a web app with a custom image, it was just the persistent “c:data” that was missing from it.
With some help from Azure Support I was able to get PSU running as a standard (non-docker) web-app in Azure. Since it uses a storage account the data should be persistent, unlike the docker containers.
We had to slightly modify the web.config to get it to work.
<?xml version="1.0" encoding="utf-8"?> <configuration> <location path="." inheritInChildApplications="false"> <system.webServer> <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> </handlers> <aspNetCore processPath="Universal.Server.exe" arguments="" forwardWindowsAuthToken="false" stdoutLogEnabled="true" stdoutLogFile="D:\home\LogFiles" hostingModel="inprocess" /> </system.webServer> </location> </configuration>
The settings were pretty standard. If you enable always on, it should be able to manage scheduling since it will be running all the time.
I’ll write this up in the docs. We are going to monitor it for the next couple of days to make sure it runs smoothly but this might be another alternative to the docker hosting.
EDIT: I’m already noticing some weird stuff.
I’ll probably have to update the appsettings.json to store the repository and databse into a different location as it’s doing some weird stuff where things are disappearing.
This is awesome! Looking forward to test this out
I’ve setup an GitHub repo with a workflow to show how to deploy to a persistent Azure web app.