-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nopCommerce Docker install to Azure #5849
Comments
Are you sure the container is running? The problem could be in the docker build |
@Laranjeiras Yes, I can confirm that the container is running from the Azure App Service -> Monitoring -> Log stream. |
Hi @jgador. We were unable to reproduce the problem. This behavior is possible if the connection string is not written to the App_Data/dataSettings.json file. Maybe the process may not have access to this file. |
Thanks for looking into this @skoshelev. I am still unable to resolve this when deploying to Azure App Service as container. This ticket may be close if others has no issues related to mine while I continue my investigation. |
Hi @jgador. We will be happy to help you if you find more information about the problem. But first of all, make sure that the correct security settings are set for the dataSettings.json file in the container. you can also enable logging to the file system in the web.config file. Perhaps some kind of failure occurs during installation. |
Hi guys, I'm having the same difficulty to implement the serveless nop... and I'm already using: create empty App_Data/datasettings.json to allow using datasettings environment variablesRUN mkdir App_Data in dockerfile.. :( |
We were unable to reproduce the problem Closed #5849 |
For anyone still having this problem, I am running on Azure App Service (Linux) with no problem. Although I didn't have this exact problem I ran into a few issues and would recommend building your own docker image. You can do this with a slightly modified version of the dockerfile from this repo:
The entrypoint.sh script should contain the following in order to setup SSH and should be saved with 'Unicode - Codepage 1200' encoding otherwise it will not run correctly:
Then under the App Service configuration page setup path mappings for App_Data and images: Ensure you copy the required files to these shares before starting the app. I would recommend that you setup NopCommerce to use Azure Blob storage for it's images, but you will still need the images file share in order to persist uploaded images between app restarts. This contains the 'original' images that get resized when necessary and then stored on the blob storage. Note: You will notice that the dockerfile sets the SSH password for root to 'Docker!'. It is important that it isn't changed as this is what the Azure portal expects to login with. It is secure as the SSH endpoint is never exposed to the outside world. In order to connect it has to be done either via the portal or an authenticated SSH proxy via PowerShell. Hopefully this helps someone. There are many ways to get NopCommerce running on App Service but this is based on our experience and was put into place to resolve a lot of issues we had. One thing that this doesn't address is caching across multiple nodes which, at time of writing, we haven't found works correctly. We had this implemented using Redis but the currently open issue #5593 has meant that we've had to switch back to a single node implementation for the time being. |
@purplepiranha Thank you for spending time and providing solution. I am now able to run nopCommerce in Azure App Service. So, my problem is that, I did not have a mounted Azure File for App_Data. When the application restarts, the appsettings and datasettings were gone. But with your explanation, I gain additional knowledge especially on the SSH also. |
nopCommerce version: 4.40.4
Steps to reproduce the problem:
Deploy nopCommerce docker from dockerhub to Azure App Service (Linux)
Proceed with installation
After installation, I am stuck at the
/install
page and could not proceed.Restart the Azure App Service
Still stuck at the
/install
pageI checked with the database to see if the migration works, and it did.
The text was updated successfully, but these errors were encountered: