master
parent
ee00b66b11
commit
4f95f6343f
@ -1,26 +0,0 @@ |
||||
color 5 |
||||
echo "if u install template error,pls connect QQ:3143422472" |
||||
|
||||
|
||||
color 3 |
||||
dotnet new -i Tiobon.Core.Webapi.Template |
||||
|
||||
set /p OP=Please set your project name(for example:TiobonMicService): |
||||
|
||||
md .1YourProject |
||||
|
||||
cd .1YourProject |
||||
|
||||
dotnet new Tioboncoretpl -n %OP% |
||||
|
||||
cd ../ |
||||
|
||||
|
||||
echo "Create Successfully!!!! ^ please see the folder .1YourProject" |
||||
|
||||
dotnet new -u Tiobon.Core.Webapi.Template |
||||
|
||||
|
||||
echo "Delete Template Successfully" |
||||
|
||||
pause |
@ -1,18 +0,0 @@ |
||||
echo off |
||||
echo "Press B to build images, P to push to registry, any other key to cancel" |
||||
set /p op= : |
||||
if "%op%"=="B" goto build |
||||
if "%op%"=="P" goto push |
||||
exit |
||||
|
||||
:build |
||||
docker rmi laozhangisphi/apkimg |
||||
docker build -f "Dockerfile" --force-rm -t laozhangisphi/apkimg . |
||||
goto end |
||||
|
||||
:push |
||||
docker push laozhangisphi/apkimg |
||||
goto end |
||||
|
||||
:end |
||||
pause |
@ -1,40 +0,0 @@ |
||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. |
||||
|
||||
#这种模式是直接在构建镜像的内部编译发布dotnet项目。 |
||||
#注意下容器内输出端口是9291 |
||||
#如果你想先手动dotnet build成可执行的二进制文件,然后再构建镜像,请看.Api层下的dockerfile。 |
||||
|
||||
|
||||
#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/aspnet:8.0 AS base |
||||
WORKDIR /app |
||||
EXPOSE 80 |
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build |
||||
WORKDIR /src |
||||
COPY ["Tiobon.Core.Api/Tiobon.Core.Api.csproj", "Tiobon.Core.Api/"] |
||||
COPY ["Tiobon.Core.Extensions/Tiobon.Core.Extensions.csproj", "Tiobon.Core.Extensions/"] |
||||
COPY ["Tiobon.Core.EventBus/Tiobon.Core.EventBus.csproj", "Tiobon.Core.EventBus/"] |
||||
COPY ["Tiobon.Core.Common/Tiobon.Core.Common.csproj", "Tiobon.Core.Common/"] |
||||
COPY ["Tiobon.Core.Model/Tiobon.Core.Model.csproj", "Tiobon.Core.Model/"] |
||||
COPY ["Tiobon.Core.Serilog.Es/Tiobon.Core.Serilog.Es.csproj", "Tiobon.Core.Serilog.Es/"] |
||||
COPY ["Ocelot.Provider.Nacos/Ocelot.Provider.Nacos.csproj", "Ocelot.Provider.Nacos/"] |
||||
COPY ["Tiobon.Core.Services/Tiobon.Core.Services.csproj", "Tiobon.Core.Services/"] |
||||
COPY ["Tiobon.Core.IServices/Tiobon.Core.IServices.csproj", "Tiobon.Core.IServices/"] |
||||
COPY ["Tiobon.Core.Repository/Tiobon.Core.Repository.csproj", "Tiobon.Core.Repository/"] |
||||
COPY ["Tiobon.Core.Tasks/Tiobon.Core.Tasks.csproj", "Tiobon.Core.Tasks/"] |
||||
COPY ["build", "build/"] |
||||
RUN dotnet restore "Tiobon.Core.Api/Tiobon.Core.Api.csproj" |
||||
COPY . . |
||||
WORKDIR "/src/Tiobon.Core.Api" |
||||
RUN dotnet build "Tiobon.Core.Api.csproj" -c Release -o /app/build |
||||
|
||||
FROM build AS publish |
||||
RUN dotnet publish "Tiobon.Core.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false |
||||
|
||||
FROM base AS final |
||||
WORKDIR /app |
||||
COPY --from=publish /app/publish . |
||||
EXPOSE 9291 |
||||
ENTRYPOINT ["dotnet", "Tiobon.Core.Api.dll"] |
@ -1,20 +0,0 @@ |
||||
|
||||
|
||||
@echo off |
||||
for /f "tokens=5" %%i in ('netstat -aon ^| findstr ":9291"') do ( |
||||
set n=%%i |
||||
) |
||||
taskkill /f /pid %n% |
||||
|
||||
|
||||
|
||||
|
||||
dotnet build |
||||
|
||||
cd Tiobon.Core.Api |
||||
|
||||
|
||||
|
||||
dotnet run |
||||
|
||||
cmd |
@ -1,31 +0,0 @@ |
||||
del .\Blog.Core.Api\bin\*.* /s /q |
||||
del .\Blog.Core.Api\obj\*.* /s /q |
||||
del .\Blog.Core.Api\wwwroot\ui\*.* /s /q |
||||
del .\Blog.Core.Api\WMBlog.db /s /q |
||||
del .\Blog.Core.Common\bin\*.* /s /q |
||||
del .\Blog.Core.Common\obj\*.* /s /q |
||||
del .\Blog.Core.EventBus\bin\*.* /s /q |
||||
del .\Blog.Core.EventBus\obj\*.* /s /q |
||||
del .\Blog.Core.Extensions\bin\*.* /s /q |
||||
del .\Blog.Core.FrameWork\bin\*.* /s /q |
||||
del .\Blog.Core.Gateway\bin\*.* /s /q |
||||
del .\Blog.Core.IServices\bin\*.* /s /q |
||||
del .\Blog.Core.Model\bin\*.* /s /q |
||||
del .\Blog.Core.Repository\bin\*.* /s /q |
||||
del .\Blog.Core.Serilog.Es\bin\*.* /s /q |
||||
del .\Blog.Core.Services\bin\*.* /s /q |
||||
del .\Blog.Core.Tasks\bin\*.* /s /q |
||||
del .\Blog.Core.Tests\bin\*.* /s /q |
||||
del .\Ocelot.Provider.Nacos\bin\*.* /s /q |
||||
|
||||
del .\Blog.Core.Extensions\obj\*.* /s /q |
||||
del .\Blog.Core.FrameWork\obj\*.* /s /q |
||||
del .\Blog.Core.Gateway\obj\*.* /s /q |
||||
del .\Blog.Core.IServices\obj\*.* /s /q |
||||
del .\Blog.Core.Model\obj\*.* /s /q |
||||
del .\Blog.Core.Repository\obj\*.* /s /q |
||||
del .\Blog.Core.Serilog.Es\obj\*.* /s /q |
||||
del .\Blog.Core.Services\obj\*.* /s /q |
||||
del .\Blog.Core.Tasks\obj\*.* /s /q |
||||
del .\Blog.Core.Tests\obj\*.* /s /q |
||||
del .\Ocelot.Provider.Nacos\obj\*.* /s /q |
@ -1,9 +0,0 @@ |
||||
|
||||
find .PublishFiles/ -type f -and ! -path '*/wwwroot/images/*' ! -name 'appsettings.*' |xargs rm -rf |
||||
dotnet build; |
||||
rm -rf /home/Tiobon.Core/Tiobon.Core.Api/bin/Debug/.PublishFiles; |
||||
dotnet publish -o /home/Tiobon.Core/Tiobon.Core.Api/bin/Debug/.PublishFiles; |
||||
rm -rf /home/Tiobon.Core/Tiobon.Core.Api/bin/Debug/.PublishFiles/WMTiobon.db; |
||||
# cp -r /home/Tiobon.Core/Tiobon.Core.Api/bin/Debug/.PublishFiles ./; |
||||
awk 'BEGIN { cmd="cp -ri /home/Tiobon.Core/Tiobon.Core.Api/bin/Debug/.PublishFiles ./"; print "n" |cmd; }' |
||||
echo "Successfully!!!! ^ please see the file .PublishFiles"; |
@ -1,19 +0,0 @@ |
||||
color B |
||||
|
||||
del .PublishFiles\*.* /s /q |
||||
|
||||
dotnet restore |
||||
|
||||
dotnet build |
||||
|
||||
cd Tiobon.Core.Api |
||||
|
||||
dotnet publish -o ..\Tiobon.Core.Api\bin\Debug\net8.0\ |
||||
|
||||
md ..\.PublishFiles |
||||
|
||||
xcopy ..\Tiobon.Core.Api\bin\Debug\net8.0\*.* ..\.PublishFiles\ /s /e |
||||
|
||||
echo "Successfully!!!! ^ please see the file .PublishFiles" |
||||
|
||||
cmd |
Before Width: | Height: | Size: 46 KiB |
@ -1,21 +0,0 @@ |
||||
# ASP.NET Core |
||||
# Build and test ASP.NET Core projects targeting .NET Core. |
||||
# Add steps that run tests, create a NuGet package, deploy, and more: |
||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core |
||||
|
||||
trigger: |
||||
- master |
||||
|
||||
pool: |
||||
vmImage: ubuntu-latest |
||||
|
||||
variables: |
||||
buildConfiguration: 'Release' |
||||
|
||||
steps: |
||||
- task: UseDotNet@2 |
||||
displayName: 'Use .NET Core sdk' |
||||
inputs: |
||||
packageType: sdk |
||||
version: 6.0.x |
||||
installationPath: $(Agent.ToolsDirectory)/dotnet |
@ -1 +0,0 @@ |
||||
cat codecov.yml | curl --data-binary @- https://codecov.io/validate |
Loading…
Reference in new issue