Skip to content
Merged
Prev Previous commit
#docker 支持#
  • Loading branch information
liaozb committed Aug 16, 2018
commit 54e893eb707315ddc4fe50289a16290f38fb8f7a
12 changes: 11 additions & 1 deletion APIJSON.NET/APIJSON.NET/APIJSON.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<None Remove="Dockerfile" />
</ItemGroup>

<ItemGroup>
<Content Include="Dockerfile">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspectCore.Extensions.Reflection" Version="0.7.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.0" />
<PackageReference Include="MySql.Data" Version="8.0.11" />
<PackageReference Include="sqlSugarCore" Version="4.6.4.9" />
Expand Down
6 changes: 6 additions & 0 deletions APIJSON.NET/APIJSON.NET/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM microsoft/aspnetcore:latest

WORKDIR /app
COPY . .

ENTRYPOINT ["dotnet", "APIJSON.NET.dll"]
2 changes: 1 addition & 1 deletion APIJSON.NET/APIJSON.NET/Services/IdentityService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public string GetUserRoleName()
public Role GetRole()
{
var role = new Role();
if (string.IsNullOrEmpty(GetUserRoleName()))
if (string.IsNullOrEmpty(GetUserRoleName()))//没登录默认取第一个
{
role = roles.FirstOrDefault();

Expand Down
10 changes: 5 additions & 5 deletions APIJSON.NET/APIJSON.NET/wwwroot/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Json在线解析</title>
<title>APIJSON.NET</title>
<meta charset="utf-8" />
<meta name="keywords" content="json,json在线解析,json格式化,json格式验证,json数组" />
<meta name="description" content="一款简洁优雅的在线json解析器,可能是目前最好用的json在线查看工具" />
<meta name="keywords" content="APIJSON.NET" />
<meta name="description" content="APIJSON.NET" />
<link href="css/hint.min.css" rel="stylesheet">
<!-- <link href="css/diffview.css" rel="stylesheet"> -->
<link href="css/loading.css" rel="stylesheet">
Expand All @@ -18,11 +18,11 @@
<span class="on">APIJSON</span><span>.NET</span>
</a>
<span class="slogan">
「也许」是最好用的JSON格式化验证工具

</span>

<div class="top-right">
<a href="https://github.com/bimohxh/jsonon" target="_blank">
<a href="https://github.com/liaozb/APIJSON.NET" target="_blank">
已开源在 GitHub 上
</a>
</div>
Expand Down