nopCommerce on a docker container (ACI)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
один год назад
So I tried spinning  nopcommerce as a Azure Container Instance  (using nopcommerceteam/nopcommerce:latest image), and a managed SQL db within same resource group. I see the install page, I enter the connection string corectly, I see on the db that tables are created, however upon "restart" on install completion, install page is shown again, so it's stuck on that install page. When I attach to running container, I see that connection string is missing from App_Data/appsettings.json, but have no idea why. I can't just edit it there because if I restart the container it would just go from the start, naturally. Any ideas why is this
happening?

Is it maybe neccesary to use docker volumes to store App_Data there?

Thanks for your feedback
один год назад
Hi, the appsettings.json file is updated in the initialisation with db connections strings in the container you are running but will be unchanged in the underlying image that you have created the container from. You need to capture the changes made to the appsettings.json file in the container and build another version of the image with the updated appsettings.json file. The easiest way may be to run nopCommerce in VisualStudio and initialise it as you prefer then  inspect the changes in the appsettings.json (a diff tool would be best).  You can then build your image with that updated appsettings.json file (you may need to tweak the db connections string as required etc). appsettings.json can have multiple variations that get resolved by setting environment variables in the build process (e.g. staging, production, testing) etc so y ou probably want to use that mechanism to have the correct appsettings.json baked into your Docker image.
good luck!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.