Azure cloud service deployment without node_modules - azure

I'm using azure cloud service with Web & Worker Role and Angular4. How can deploy package without node_modules and run NPM install command after complete deployment. Is there any way?

Related

Permissions on Azure DevOps Artifacts and private npm repository

We use a self-hosted Azure DevOps server for our private npm packages.
We've had success using Azure Pipelines to build and deploy packages to Azure Artifacts. This works fine but I and my colleagues can still publish from the npm command npm publish.
Can anyone tell me how to publish packages only from Azure pipelines and prevent users to publish from their development machine ?
Please check this official doc:
https://learn.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops#permissions-table
You need to set permission in this place:

TimeTrigger Azure Function gives No Module Error in Azure Portal but runs well in VSC

I successfully have created an Azure Time Trigger in Visual Studio Code.
I tested it in VSC before uploading onto Azure portal and it ran ok
When I run it in Azure though, it gives me an error no module named;
I have gone back to try and install modules in the.venv and the modules exist.
How can I have this resolved?
The function on azure cloud will install the modules according to the requirements.txt. So when you deploy the function from local to azure portal, the modules which installed on local will not also be installed on azure cloud if you didn't add the modules to requirements.txt. You can run the command below to add all of the modules into requirements.txt automatically:
pip freeze > requirements.txt
And then run func azure functionapp publish <funciton app name on azure> --build remote to deploy the function from local to azure.

How to show deployment log when deploying by using firebase tool in program (no CLI)

I have a question about deployment with firebase-tools module.
I'd like to deploy firebase by using firebase-tools node module and I succeeded to deploy this way.
However the deployment from firebase-tools module didn't show deployment logs.
In CLI case, we can see the deployment log that shows which deployment was done.
So how can I see the deployment logs in program case?

How to run npm command on azure app service after deployment success by VSTS?

Now I can deploy from VSTS to azure, but I can't run npm after deploy is successful.
Now it is work like -> run npm install for branch files => zip => copy to azure => deploy.
I want to add npm run custom-comand to end of this chain.
How to do it?
The Azure App Service Deployment task in VSTS now supports a post-deployment script. Here is a screen-shot from version 3.* of the task:
See Task Parameters for more details.
Windows App Services users: Watch out for an npm bug that prevents multiple npm commands from being run (inline or in a script). For example:
npm install
npm test
Will only run npm install. There are several workarounds including this:
npm install & npm test
There is no out of box build task to achieve the feature you want. If you do want to run the npm from Azure App Service:
Manually: You can go to Kudu console of the App Service and run npm command there:
Automatically: You need to create your own build task to run the npm command via Kudu Rest API
You can run commands like npm install via the Kudu REST API.
Here's a scripted example written in PowerShell.
Add a PowerShell script task after the Azure App Service Deploy task to invoke npm install (or any other command that Kudu supports). And disable the npm install task in your build pipeline.
The Kudu deployment engine that App Service leverages has the ability to run custom deployment scripts. You can include your desired npm command inside of a custom deployment script that will be executed as part of the deployment on Azure's side. No REST API calls required and everything stays in your source control system.
You can use PowerShell task or npm task to execute npm commands .
One thing to note: you also need to upload the .npmrc with auth token to Azure.

Azure web app to serve vuejs app

I have a vuejs app using webpack, which can also be package into electron app.
The structure of the app is like the following:
https://github.com/kahwooi/vuetron
It can be run on webpack-dev-server.
My question is can the app run on Azure or any web server?
Yes, generally speaking, Azure Web Apps as a web service platform provides production environment for web applications. So you can try the following steps for the simplest requirement to run vuetron on Azure.
Install the vuetron on your local environment:
# Install electron and webpack-dev-server
npm install -g electron webpack-dev-server
# Install vue-cli and scaffold boilerplate
npm install -g vue-cli
vue init kahwooi/vuetron my-project
# Install dependencies and run your app in development mode
cd my-project
npm install
# View app using browser at http://localhost:8080, automatically updates the browser on changes.
# Run as electron desktop app
webpack
Remove the /dist in .gitignore file in your directory.
Create a Web App with local git deployment via Azure-Cli:
azure login
azure config mode asm
azure site create --git {your_site_name}
Deploy your application to Azure via Git:
git add .
git commit -m "{your commit message}"
git push azure master
Finally, launch your live Azure app in the browser:
azure site browse
Any further concern, please feel free to let me know.

Resources