Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MatrixOne.SlackApi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李福茂
MatrixOne.SlackApi
Commits
69049aca
Commit
69049aca
authored
Nov 30, 2021
by
Maodashu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initiallized
parent
c66528d3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
15 deletions
+78
-15
.dockerignore
MatrixOne.SlackApi.WebApi/.dockerignore
+25
-0
Dockerfile
MatrixOne.SlackApi.WebApi/Dockerfile
+22
-0
MatrixOne.SlackApi.WebApi.csproj
MatrixOne.SlackApi.WebApi/MatrixOne.SlackApi.WebApi.csproj
+8
-0
Startup.cs
MatrixOne.SlackApi.WebApi/Startup.cs
+11
-1
appsettings.S.json
MatrixOne.SlackApi.WebApi/appsettings.S.json
+3
-7
appsettings.TEST.json
MatrixOne.SlackApi.WebApi/appsettings.TEST.json
+6
-0
appsettings.local.json
MatrixOne.SlackApi.WebApi/appsettings.local.json
+2
-6
index.html
MatrixOne.SlackApi.WebApi/wwwroot/index.html
+1
-1
No files found.
MatrixOne.SlackApi.WebApi/.dockerignore
0 → 100644
View file @
69049aca
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
\ No newline at end of file
MatrixOne.SlackApi.WebApi/Dockerfile
0 → 100644
View file @
69049aca
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM
mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR
/app
EXPOSE
80
EXPOSE
443
FROM
mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR
/src
COPY
["MatrixOne.SlackApi.WebApi/MatrixOne.SlackApi.WebApi.csproj", "MatrixOne.SlackApi.WebApi/"]
RUN
dotnet restore
"MatrixOne.SlackApi.WebApi/MatrixOne.SlackApi.WebApi.csproj"
-s
"http://nuget.matrixone.io:5555/v3/index.json"
COPY
. .
WORKDIR
"/src/MatrixOne.SlackApi.WebApi"
RUN
dotnet build
"MatrixOne.SlackApi.WebApi.csproj"
-c
Release
-o
/app/build
--source
"http://nuget.matrixone.io:5555/v3/index.json"
FROM
build AS publish
RUN
dotnet publish
"MatrixOne.SlackApi.WebApi.csproj"
-c
Release
-o
/app/publish
--no-restore
FROM
base AS final
WORKDIR
/app
COPY
--from=publish /app/publish .
ENTRYPOINT
["dotnet", "MatrixOne.SlackApi.WebApi.dll"]
\ No newline at end of file
MatrixOne.SlackApi.WebApi/MatrixOne.SlackApi.WebApi.csproj
View file @
69049aca
...
...
@@ -8,11 +8,19 @@
<DocumentationFile>MatrixOne.SlackApi.WebApi.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Remove="logs\**" />
<Content Remove="logs\**" />
<EmbeddedResource Remove="logs\**" />
<None Remove="logs\**" />
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.21" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog" Version="4.7.12" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
...
...
MatrixOne.SlackApi.WebApi/Startup.cs
View file @
69049aca
...
...
@@ -59,7 +59,17 @@ namespace MatrixOne.SlackApi.WebApi
policy
.
AllowAnyOrigin
().
AllowAnyHeader
().
AllowAnyMethod
();
});
});
services
.
AddMvcCore
();
services
.
AddMvcCore
().
AddCors
(
options
=>
{
options
.
AddPolicy
(
options
.
DefaultPolicyName
,
policy
=>
{
policy
.
AllowAnyHeader
()
.
AllowAnyMethod
()
.
AllowCredentials
()
.
SetIsOriginAllowed
(
origin
=>
true
);
});
}).
AddNewtonsoftJson
();
//配置 Http客户端服务,注入HttpClientFactory
services
.
AddHttpClient
(
"INTERNAL"
);
//内网专用
...
...
MatrixOne.SlackApi.WebApi/appsettings.S.json
View file @
69049aca
{
"Logging"
:
{
"LogLevel"
:
{
"Default"
:
"Information"
,
"Microsoft"
:
"Warning"
,
"Microsoft.Hosting.Lifetime"
:
"Information"
}
"Swagger"
:
{
"VirtualPath"
:
"/slackapi"
},
"DebugLogging"
:
"O
N
"
"DebugLogging"
:
"O
FF
"
}
MatrixOne.SlackApi.WebApi/appsettings.TEST.json
0 → 100644
View file @
69049aca
{
"Swagger"
:
{
"VirtualPath"
:
"/slackapi"
},
"DebugLogging"
:
"ON"
}
MatrixOne.SlackApi.WebApi/appsettings.local.json
View file @
69049aca
{
"Logging"
:
{
"LogLevel"
:
{
"Default"
:
"Information"
,
"Microsoft"
:
"Warning"
,
"Microsoft.Hosting.Lifetime"
:
"Information"
}
"Swagger"
:
{
"VirtualPath"
:
""
},
"DebugLogging"
:
"ON"
}
MatrixOne.SlackApi.WebApi/wwwroot/index.html
View file @
69049aca
...
...
@@ -12,7 +12,7 @@
</head>
<body>
<div
class=
"row"
>
<div
class=
"frame titleText"
>
WebsocketHub
Console
</div>
<div
class=
"frame titleText"
>
SlackApi
Console
</div>
<div
id=
"btn_swagger"
class=
"button whiteText"
>
Swagger
</div>
<div
id=
"btn_clean_all_logs"
class=
"button whiteText"
>
Clean all logs
</div>
<div
id=
"btn_clean_unloaded_logs"
class=
"button whiteText"
>
Clean unloaded logs
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment