SAFE-Stack / SAFE-template

dotnet CLI template for SAFE project
MIT License
280 stars 87 forks source link

Changes to allow Linux Azure App Service #528

Closed theprash closed 1 year ago

theprash commented 1 year ago

Closes #477

isaacabraham commented 1 year ago

This looks good to me. Docs need updating as a result of this but I think that that should be fine. It would be good to understand why this change fixes the Linux deployment?

isaacabraham commented 1 year ago

@theimowski this should be pushed in, I think we'll need to update the docs which reference 8085 and maybe add a FAQ for historical purposes to explain the changes.

isaacabraham commented 1 year ago

@theprash once you've added in that extra line this can go in.

theprash commented 1 year ago

@isaacabraham Added the line to explicitly set the OS to Windows 👍🏾 (the idea is that it should be obvious how to change it to Linux)

isaacabraham commented 1 year ago

Merged in - @theimowski if you can let us know once the next release of the template goes out, we'll push out docs alongside it.

theimowski commented 1 year ago

Sure, will do this in the coming week 👍

theimowski commented 1 year ago

Hmm I'm on a7c0e12c87a27060ee18ea3969943c20ddd1b97b and server doesn't work for me anymore locally on MacOS.

server:

dotnet watch run
dotnet watch 🚀 Started
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[62]
      User profile is available. Using '/Users/theimowski/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/theimowski/oss/SAFE-Stack/SAFE-template/Content/minimal/src/Server

client:

<e> [webpack-dev-server] [HPM] Error occurred while proxying request localhost:8080/api/hello to http://localhost:5000/ [ECONNRESET] (https://nodejs.org/api/errors.html#errors_common_system_errors)

Seems like client is trying to proxy to http while server is only https?

On 4.0.0 tag the server listens on http:

info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://[::]:8085
theprash commented 1 year ago

@theimowski Actually, I'm getting the same error now. I don't know how it worked for me before. Changing the URL in launchSettings.json fixes the problem, so I'll open another PR.

theimowski commented 1 year ago

@isaacabraham @theprash this is now released in 4.1.0