Closed matjanos closed 7 years ago
install nginx
build API on dev machine
copy binaries to RaspberyPI
change *.runtimeconfig.json file to use your Mictosoft.NETCore.App version. f.e:
*.runtimeconfig.json
{ "runtimeOptions": { "framework": { "name": "Microsoft.NETCore.App", "version": "1.2.0-beta-001291-00" }, "configProperties": { "System.GC.Server": true } } }
Replace System libraries to correct version:
cp /opt/dotnet/shared/Microsoft.NETCore.App/1.2.0-beta-001291-00/System.ComponentModel.Primitives.dll . cp /opt/dotnet/shared/Microsoft.NETCore.App/1.2.0-beta-001291-00/System.ComponentModel.TypeConverter.dll . cp /opt/dotnet/shared/Microsoft.NETCore.App/1.2.0-beta-001291-00/System.Collections.Specialized.dll . cp /opt/dotnet/shared/Microsoft.NETCore.App/1.2.0-beta-001291-00/System.Linq.dll .
Change nginx config /etc/nginx/sites-available/default to:
/etc/nginx/sites-available/default
server { listen 80; location / { proxy_pass http://localhost:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
Reload nginx by sudo nginx -s reload
sudo nginx -s reload
Refs: https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction https://github.com/dotnet/coreclr/issues/9168 https://github.com/dotnet/core/blob/master/release-notes/rc4-download.md https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md
install nginx
build API on dev machine
copy binaries to RaspberyPI
change
*.runtimeconfig.json
file to use your Mictosoft.NETCore.App version. f.e:Replace System libraries to correct version:
Change nginx config
/etc/nginx/sites-available/default
to:Reload nginx by
sudo nginx -s reload
Refs: https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction https://github.com/dotnet/coreclr/issues/9168 https://github.com/dotnet/core/blob/master/release-notes/rc4-download.md https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md