Merge pull request #1 from Karolis2011/master

Update with master
This commit is contained in:
Geeves
2019-06-19 07:06:34 +02:00
committed by GitHub
8 changed files with 83 additions and 10 deletions

18
EventBot/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM mcr.microsoft.com/dotnet/core/runtime:2.2-stretch-slim AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY ["EventBot/EventBot.csproj", "EventBot/"]
RUN dotnet restore "EventBot/EventBot.csproj"
COPY . .
WORKDIR "/src/EventBot"
RUN dotnet build "EventBot.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "EventBot.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "EventBot.dll"]

View File

@@ -3,12 +3,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Discord.Addons.Interactive" Version="1.0.1" />
<PackageReference Include="Discord.Net" Version="2.1.1" />
@@ -20,6 +17,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.7.9" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
</ItemGroup>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp2.2</TargetFramework>
<PublishDir>bin\Release\netcoreapp2.2\publish\linux-arm</PublishDir>
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<_IsPortable>false</_IsPortable>
</PropertyGroup>
</Project>

View File

@@ -3,8 +3,12 @@
"EventBot": {
"commandName": "Project",
"environmentVariables": {
"dbconnection": "Server=localhost;Database=eventbot;User=root;Password=tux;",
"token": "<insert Token here>"
}
},
"Docker": {
"commandName": "Docker"
}
}
}