deploying nopCommerce 4.3

1 个月 前
After reading through all the documentation I am still unsure about how to deploy to my Windows host.
From what I understand, I can either copy the "no-source code" download to httpdocs or I can publish from VS2019. My understanding is that if I publish from my local code in its vanilla state it has the same effect as copying the Windows no-source code.
I did read in the deployment to Azure that a regular publishing from VS is not enough as it does not catch the admin site or plug-ins. I'm not sure if this is also the case for publishing to a a Windows host, and if so, how to handle that.
The publish has a deployment mode option of either "framework dependent" or "Self-contained" and my understanding is if my Windows host has net core 3.1 installed then "framework dependent" is sufficient.
I'm not sure as to the difference in target run time of "portable" and "win-x64".
Finally, if I add a plug-in or widget locally, what are the steps to bring that to the host? Locally I have seen good examples of how this works, but I would like to have the correct steps for publishing.

Thanks so much!
1 个月 前
How you manage all this depends on your ultimate intentions for making changes and ongoing development, if you are using Azure or standard windows server.

If it is just a couple of little changes to the core then go ahead. Generally the best way to make more substantial and ongoing changes to a system is to create plugins, although there is some overhead. That way the changes are all contained and manageable and allow for easier upgrades in the future.

robertfarquharson wrote:
I can either copy the "no-source code" download to httpdocs or I can publish from VS2019. My understanding is that if I publish from my local code in its vanilla state it has the same effect as copying the Windows no-source code.
Yes that is how the no-source version is created i.e. by publishing the source code version to a local directory. This would normally include all the Admin and Plugins that are part of the VS Project.

If you are doing any ongoing development to the core code then you may want to introduce this step anyway. Then you copy (or ftp) to this current published version, or just the changes from the last update to the windows server.

robertfarquharson wrote:
if I add a plug-in or widget locally, what are the steps to bring that to the host? Locally I have seen good examples of how this works, but I would like to have the correct steps for publishing.

Once you develop and test the plugin on your local development system then you can publish the website to a local directory, which does include the plugins. Then there are two options. Copy or ftp the published plugin directory from your local publish to the your windows server or a better way is to create install package and then use the inbuilt function to install the plugin. This second has the benefit of maintaining a history of versions as packages.

robertfarquharson wrote:
The publish has a deployment mode option of either "framework dependent" or "Self-contained" and my understanding is if my Windows host has net core 3.1 installed then "framework dependent" is sufficient. I'm not sure as to the difference in target run time of "portable" and "win-x64".
If your windows system (or cross platform system) is setup with the necessary infrastructure then "framework dependent" is all you need to do.

Anyways this is some of the things I do. I don’t use Azure so someone else may help with the best way to manage delivery to that System. Like a lot of things there is new maybe more productive/better ways but sometimes the basic way is easy.