Permalink
Browse files

Merge branch 'core'

  • Loading branch information...
Daniel15 committed Nov 13, 2017
2 parents ef5033c + 7023cba commit 8f0018b8317e798f522c5718a3533bf21ab7784c
Showing with 15 additions and 15 deletions.
  1. +5 −1 Daniel15.Web/Daniel15.Web.csproj
  2. +4 −1 Daniel15.Web/Startup.cs
  3. +3 −2 Daniel15.Web/supervisord.conf
  4. +1 −1 README.md
  5. +2 −10 publishToTemp.bat
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Daniel15.Web</AssemblyName>
<OutputType>Exe</OutputType>
@@ -24,6 +24,9 @@
<ItemGroup>
<PackageReference Include="Daniel15.SimpleIdentity" Version="2.0.0" />
<PackageReference Include="JavaScriptEngineSwitcher.ChakraCore" Version="2.4.10" />
<PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.debian-x64" Version="2.4.6" />
<PackageReference Include="JavaScriptEngineSwitcher.ChakraCore.Native.win-x64" Version="2.4.6" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.0.0-alpha9-00202" />
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.0.0-alpha9-00202" />
<PackageReference Include="React.AspNet" Version="3.1.0" />
@@ -43,6 +46,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
View
@@ -3,6 +3,8 @@
using System.Linq;
using Daniel15.Infrastructure;
using Daniel15.SimpleIdentity;
using JavaScriptEngineSwitcher.ChakraCore;
using JavaScriptEngineSwitcher.Core;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@@ -36,13 +38,14 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
services.AddSession();
services.AddMvc();
JsEngineSwitcher.Instance.EngineFactories.Add(new ChakraCoreJsEngineFactory());
services.AddReact();
services.AddDaniel15(Configuration);
services.AddDaniel15Config(Configuration);
services.AddMiniProfiler(options =>
{
options.ResultsAuthorize = options.ResultsListAuthorize =
options.ShouldProfile = options.ResultsAuthorize = options.ResultsListAuthorize =
request => request.HttpContext.User.Identity.IsAuthenticated;
}).AddEntityFramework();
@@ -1,5 +1,6 @@
[program:dan]
command=mono /var/www/dan.cx/live/site/Daniel15.Web.exe --server.urls http://unix:/run/user/33/dan-live.sock
environment=ASPNETCORE_ENVIRONMENT=Production,HOME=/var/www/
command=/usr/bin/dotnet /var/www/dan.cx/live/site/Daniel15.Web.dll
# LD_LIBRARY_PATH is a workaround for https://github.com/dotnet/corefx/issues/24891
environment=ASPNETCORE_ENVIRONMENT=Production,ASPNETCORE_URLS=http://unix:/run/user/33/dan-live.sock,LD_LIBRARY_PATH=/usr/local/lib/openssl1.1
user=www-data
directory=/var/www/dan.cx/live/site/
View
@@ -3,7 +3,7 @@
This is the code that powers [my personal website](https://dan.cx/) and blog. It uses C# and the ASP.NET Core MVC framework, with some older bits in PHP.
The live site is currently running on [Mono](http://www.mono-project.com/) 3.8.0.
The live site is currently running on .NET Core 2.0
Blog
====
View
@@ -1,11 +1,3 @@
::: ASP.NET Core view precompilation doesn't work when cross-compiling for Linux
::: (https://github.com/aspnet/MvcPrecompilation/issues/102). This works around it by building first
::: for Windows, then building again for Debian, then copying across the view assembly.
dotnet restore
dotnet publish Daniel15.Web -o "C:\TempPublish\site_win" -c Release
dotnet restore -r debian.8-x64
dotnet publish Daniel15.Web -o "C:\TempPublish\site" -c Release -r debian.8-x64 /p:MvcRazorCompileOnPublish=false
dotnet publish Daniel15.Cron -o "C:\TempPublish\cron" -c Release -r debian.8-x64
copy c:\TempPublish\site_win\Daniel15.Web.PrecompiledViews.dll c:\TempPublish\site\
rd /s /q c:\TempPublish\site\Views
dotnet publish Daniel15.Web -o "C:\TempPublish\site" -c Release
dotnet publish Daniel15.Cron -o "C:\TempPublish\cron" -c Release

0 comments on commit 8f0018b

Please sign in to comment.