Today I added few more features to my PWA and created a production build. But when I tried to test it on the production environment, my service worker file was not updated. Hence it refers my old versions of - index.html, main.js, main.css and polyfill.js files. It was weird completely
I am having a version number on my service worker file and I changed it before taking LIVE (run on number)… As per the standard if the sw detects a byte change from the installed version, then it will download and install the newer version which was not happening in my case…
Any suggestion… Thanks in advance!
regards,
Mano
Related
A requirement where I need to aad files (Like .txt or .eml) from S3 into the project just before deploying the code into the Heroku server. I can do this on my local machine by creating a commit but in this case, that file will be downloaded into my local machine.
We don't want to download the file into my local machine just wanted to add that file into the project that it can de available during the deployment.
So someone guides me that How to download content from S3 and include it to build slug or package during deployment.
Any help will be highly appreciated.
Thanks
It's a little bit of work, but you could look into implementing your own buildpack for this app. Heroku supports multiple buildpacks that are executed (in order) on your app when your app is built as part of the deploy process, see https://devcenter.heroku.com/articles/buildpacks#creating-a-buildpack for more details. After running the language builpack, your buildpack could download the file, which will then be available to your Dynos when the app has finished building and is being run.
This is my first foyer into .Net Core and App Engines, so please forgive me if I sound uninformed.
We have a .Net Core Application that we're trying to get published to a GCP App engine (obviously). when I run dotnet publish -c Release it builds just fine without any errors. When I test the program locally it runs just fine and I'm able to access it. However whenever I try to get it on GCP I get the following error:
Updating service [default] (this may take several minutes)...
.................................................................................................................................................failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
Error:
An assembly specified in the application dependencies manifest (ApplicationName.deps.json) was not found:
package: 'Microsoft.AspNetCore.Mvc.Abstractions', version: '2.0.2'
path: 'lib/netstandard2.0/Microsoft.AspNetCore.Mvc.Abstractions.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.5.xml
Failed to deploy project WebApiDotNetCore to App Engine Flex.
We tried removing it from the dependencies JSON, and that just ended up breaking everything, so it is indeed required. It is installed in the project via nuget, so it should be included with dotnet restore. I've looked around and some sources seem to think that it's the installation of the dotnet core sdk, but I've tried it on three computers and always get the same thing.
Lastly, I should say this happens when I try to deploy through command line as well as directly through Visual Studio with the GCP SDK.
Has anyone experienced this error, or something similar? Any advice or guidance is very much appreciated.
Thanks!
-BT
OP REVISION
As an update I was able to get this resolved aside from the fact that I get a 502 error when I try to load the application. Here are the steps I took for anyone else that is looking what to do:
Pre-reqs: Docker for Windows and Google Cloud SDK installed and running. Running turned out to be a pain with Docker for Windows. Many many restarts and reinstallations.
Open the solution and ensure that the startup project is set correctly.
Right click the startup Project, and select Add > Docker Support.
Select Linux in the popup window and allow the files to be created.
When complete, the Dockerfile should appear in the preview window. Do the following:
For me the first line read: FROM microsoft/aspnetcore:2.0 AS base. Change this to FROM microsoft/aspnetcore-build:2.0 AS base.
Additionally, check to make sure that the last line has the correct .dll name. Docker for Windows will put whatever the project name is rather than the class name, so for me my final .dll names were different than the project name.
Lastly, if your project has any dependencies that are required to run but not to build, then you'll need to manually add them. For me we have a couple of XML files that needed to be put in the app folder, so I had to add COPY *.xml /app/ and put those files in the same folder as the solution file is in.
If there's anything else you need to do to the Dockerfile I highly recommend this page. It's a how-to on all Dockerfile commands written in ENGLISH! (that was my biggest problem with all of this - I have little experience with Linux and even less with Docker and everything was written in Greek for me).
Create an app.yaml file. I just used the standard:
runtime: custom
env: flex
Copy the Dockerfile found in the startup project's folder into the folder with the solution.
Initialize gcloud to the right project, then navigate to the solution folder. The type gcloud app deploy app.yaml, and follow the onscreen guide.
for me it takes about 15 minutes to deploy the GCP, so depending on the complexity of your project it may take longer, though this one is rather complex.
Now I'm trying to figure out my 502 error... I've tried what seems like everything - changing the listening port in the application, exposing the listening port on the dockerfile, trying to get GCP to open that port, and trying half a dozen different ports. It's slow-going since it's such a chore to deploy each time.
Hope this helps anyone that was like me a couple weeks ago and had never even heard of Docker!
Which version of .NET Core is this? Also, have you tried to run in Cloud Shell? Maybe that will provide more clues on what might be wrong.
It looks that you don't have the Microsoft.AspNetCore.Mvc.Abstractions library installed in your system. Using the .NET CLI, type the following command:
dotnet add package Microsoft.AspNetCore.Mvc.Abstractions --version 2.0.2
After that, to ensure the library is included, run the following:
dotnet restore
dotnet build
Try running it locally (it should work), and then use the dotnet publish -c Release command again.
I have automated deployment of ASP.NET MVC app which uses NewRelic for performance profiling to azure using MSBuild and WebDeploy.
I have used waws-prod-blu-001.publish.azurewebsites.windows.net:443 url for deployment as it was mentioned in publish profile. Also I stop my website before deployment and start after as NewRelic locks some log files so deployment fails. This is official workaround mentioned in NewRelic documentation.
Usually deployment takes 2-3 minutes. However last days deployment started taking more than 30 minutes and fails from time to time. I have downloaded new publish profile and noticed that WebDeploy url was changed to KUDU url ({my-app}.scm.azurewebsites.net:443). After updating url deployment takes 2-3 minutes as usual. However when I stop website KUDU is also not accessible and I cannot do deployment.
My question is: how can I do deployment of Azure website which uses NewRelic via KUDU when NewRelic requires website to be stopped while deployment and KUDU requires website running for deployment. Any other way of deployment are also acceptable.
I have already tried next things:
1) Deploy via FTP is also very, very slow as it uses the same url (ftps://waws-prod-blu-001.publish.azurewebsites.windows.net/).
2) Restaring website before deployment doesn't help. NewRelic still locks some log file.
In the Azure portal you can force Azure to unload the profiler DLL file by changing the app setting COR_ENABLE_PROFILING to 0 and hitting save. This will restart IIS and unload the DLL without users seeing any error (just a delay in getting to the site). You can then run the deploy which should proceed without the locking issue. Make sure that the app setting is back to 1 when your finished deploying.
You can also do this via Azure Powershell.
We made a recent change that allows Kudu to continue running even if you stop the site. So the simpler way to avoid this issue now is simply to stop the site, publish, and restart the site.
I am trying to change the html.erb files from my application, but when i upload the new version and i check with a browser it's still the old one, i tried different browsers/cleared cache.
Do I need to restart the app? if so, how do i do that?
You say you are "uploading the new version" which suggests that you're talking about a server run in production mode (e.g. not your local development environment). In that case, yes, you likely need to restart your application server. E.g. if you are running with Apache/Passenger, then restart Apache.
I am really confused i have a directory structure as follows.
/foo/bar/project/
under project is the python environment via virtualenv.
I have two additional folders live, and beta.
Live is served via apache wsgi and beta is served using paster.
Some how the live site is serving templates from the beta directory. To make sure i wasn't losing my mind I renamed the beta directory to wtfbeta expecting the server to throw an error helping me track down what went wrong.
Nope, instead it just falls back to loading the correct template from the live directory. (after service apache2 restart).
I am really stuck here.
This issue was related to both sites using the same virtualenv.