Required push
This commit is contained in:
parent
5e0939db3d
commit
a3c9481f3f
74 changed files with 2388 additions and 9 deletions
|
|
@ -27,14 +27,12 @@ namespace Bot_Discord_CSharp
|
||||||
{
|
{
|
||||||
token = Environment.GetEnvironmentVariable("TOKEN");
|
token = Environment.GetEnvironmentVariable("TOKEN");
|
||||||
prefix = Environment.GetEnvironmentVariable("PREFIX");
|
prefix = Environment.GetEnvironmentVariable("PREFIX");
|
||||||
Console.WriteLine(0);
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
ProfilesDto profiles = JsonConvert.DeserializeObject<ProfilesDto>(System.IO.File.ReadAllText("./launchSettings.json"));
|
ProfilesDto profiles = JsonConvert.DeserializeObject<ProfilesDto>(System.IO.File.ReadAllText("./launchSettings.json"));
|
||||||
SecretsDto secrets = profiles.Bot_Discord_CSharp.EnvironmentVariables.Secrets;
|
SecretsDto secrets = profiles.Bot_Discord_CSharp.EnvironmentVariables.Secrets;
|
||||||
token = secrets.Token;
|
token = secrets.Token;
|
||||||
prefix = secrets.Prefix;
|
prefix = secrets.Prefix;
|
||||||
Console.WriteLine(System.IO.File.ReadAllText("./launchSettings.json"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = new DiscordConfiguration
|
var config = new DiscordConfiguration
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>exe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
|
<StartupObject>Bot_Discord_CSharp.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -18,6 +20,12 @@
|
||||||
<Folder Include="Properties\" />
|
<Folder Include="Properties\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Properties\launchSettings.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
|
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,23 @@
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy csproj and restore as distinct layers
|
# Copy csproj and restore as distinct layers
|
||||||
COPY *.csproj ./
|
COPY *.sln .
|
||||||
|
COPY Bot_Discord_CSharp/*.csproj ./aspnetapp/
|
||||||
|
#COPY *.csproj ./
|
||||||
RUN dotnet restore
|
RUN dotnet restore
|
||||||
|
|
||||||
# Copy everything else and build
|
# Copy everything else and build
|
||||||
COPY . ./
|
COPY Bot_Discord_CSharp/. ./aspnetapp/
|
||||||
|
WORKDIR /app/aspnetapp
|
||||||
|
#COPY . ./
|
||||||
RUN dotnet publish -c Release -o out
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
# Build runtime image
|
# Build runtime image
|
||||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 as runtime
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build-env /app/out .
|
COPY --from=build /app/aspnetapp/out ./
|
||||||
|
#COPY --from=build-env /app/out .
|
||||||
|
|
||||||
|
|
||||||
#COPY config.json ./
|
#COPY config.json ./
|
||||||
COPY Properties/launchSettings.json ./
|
COPY Properties/launchSettings.json ./
|
||||||
|
|
|
||||||
6
Bot_Discord_CSharp/PasosParaSubirDocker.txt
Normal file
6
Bot_Discord_CSharp/PasosParaSubirDocker.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
heroku container:login
|
||||||
|
docker build -t discord-bot-dsharp "E:\Proyectos Visual Studio\Bot_Discord_CSharp\Bot_Discord_CSharp\bin\Release\netcoreapp3.1\publish"
|
||||||
|
docker tag discord-bot-dsharp registry.heroku.com/discord-bot-dsharp/worker
|
||||||
|
docker push registry.heroku.com/discord-bot-dsharp/worker
|
||||||
|
heroku container:release worker --app discord-bot-dsharp
|
||||||
|
heroku container:push release --app discord-bot-dsharp
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
namespace Bot_Discord_CSharp
|
namespace Bot_Discord_CSharp
|
||||||
{
|
{
|
||||||
class Program
|
public class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Bot bot = new Bot();
|
Bot bot = new Bot();
|
||||||
bot.RunAsync().GetAwaiter().GetResult();
|
bot.RunAsync().GetAwaiter().GetResult();
|
||||||
|
|
|
||||||
26
Dockerfile
Normal file
26
Dockerfile
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy csproj and restore as distinct layers
|
||||||
|
COPY *.sln .
|
||||||
|
COPY Bot_Discord_CSharp/*.csproj ./aspnetapp/
|
||||||
|
#COPY *.csproj ./
|
||||||
|
RUN dotnet restore
|
||||||
|
|
||||||
|
# Copy everything else and build
|
||||||
|
COPY Bot_Discord_CSharp/. ./aspnetapp/
|
||||||
|
WORKDIR /app/aspnetapp
|
||||||
|
#COPY . ./
|
||||||
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
|
# Build runtime image
|
||||||
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 as runtime
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/aspnetapp/out ./
|
||||||
|
#COPY --from=build-env /app/out .
|
||||||
|
|
||||||
|
|
||||||
|
#COPY config.json ./
|
||||||
|
COPY Properties/launchSettings.json ./
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "Bot_Discord_CSharp.dll"]
|
||||||
2282
app/Bot_Discord_CSharp.deps.json
Normal file
2282
app/Bot_Discord_CSharp.deps.json
Normal file
File diff suppressed because it is too large
Load diff
BIN
app/Bot_Discord_CSharp.dll
Normal file
BIN
app/Bot_Discord_CSharp.dll
Normal file
Binary file not shown.
BIN
app/Bot_Discord_CSharp.exe
Normal file
BIN
app/Bot_Discord_CSharp.exe
Normal file
Binary file not shown.
9
app/Bot_Discord_CSharp.runtimeconfig.json
Normal file
9
app/Bot_Discord_CSharp.runtimeconfig.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"runtimeOptions": {
|
||||||
|
"tfm": "netcoreapp3.1",
|
||||||
|
"framework": {
|
||||||
|
"name": "Microsoft.NETCore.App",
|
||||||
|
"version": "3.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
app/ConcurrentCollections.dll
Normal file
BIN
app/ConcurrentCollections.dll
Normal file
Binary file not shown.
BIN
app/DSharpPlus.CommandsNext.dll
Normal file
BIN
app/DSharpPlus.CommandsNext.dll
Normal file
Binary file not shown.
BIN
app/DSharpPlus.Interactivity.dll
Normal file
BIN
app/DSharpPlus.Interactivity.dll
Normal file
Binary file not shown.
BIN
app/DSharpPlus.dll
Normal file
BIN
app/DSharpPlus.dll
Normal file
Binary file not shown.
28
app/Dockerfile
Normal file
28
app/Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy csproj and restore as distinct layers
|
||||||
|
COPY *.sln .
|
||||||
|
WORKDIR /.
|
||||||
|
COPY Bot_Discord_CSharp/*.csproj ./aspnetapp/
|
||||||
|
WORKDIR /app
|
||||||
|
#COPY *.csproj ./
|
||||||
|
RUN dotnet restore
|
||||||
|
|
||||||
|
# Copy everything else and build
|
||||||
|
COPY Bot_Discord_CSharp/. ./aspnetapp/
|
||||||
|
WORKDIR /app/aspnetapp
|
||||||
|
#COPY . ./
|
||||||
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
|
# Build runtime image
|
||||||
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 as runtime
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/aspnetapp/out ./
|
||||||
|
#COPY --from=build-env /app/out .
|
||||||
|
|
||||||
|
|
||||||
|
#COPY config.json ./
|
||||||
|
COPY Properties/launchSettings.json ./
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "Bot_Discord_CSharp.dll"]
|
||||||
BIN
app/Emzi0767.Common.dll
Normal file
BIN
app/Emzi0767.Common.dll
Normal file
Binary file not shown.
BIN
app/HtmlAgilityPack.dll
Normal file
BIN
app/HtmlAgilityPack.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Authentication.Abstractions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Authentication.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Authentication.Core.dll
Normal file
BIN
app/Microsoft.AspNetCore.Authentication.Core.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Connections.Abstractions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Connections.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Diagnostics.Abstractions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Diagnostics.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Diagnostics.dll
Normal file
BIN
app/Microsoft.AspNetCore.Diagnostics.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.HostFiltering.dll
Normal file
BIN
app/Microsoft.AspNetCore.HostFiltering.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Hosting.Abstractions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Hosting.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Hosting.Server.Abstractions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Hosting.Server.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Hosting.dll
Normal file
BIN
app/Microsoft.AspNetCore.Hosting.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Http.Abstractions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Http.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Http.Extensions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Http.Extensions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Http.Features.dll
Normal file
BIN
app/Microsoft.AspNetCore.Http.Features.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Http.dll
Normal file
BIN
app/Microsoft.AspNetCore.Http.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.HttpOverrides.dll
Normal file
BIN
app/Microsoft.AspNetCore.HttpOverrides.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Routing.Abstractions.dll
Normal file
BIN
app/Microsoft.AspNetCore.Routing.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Routing.dll
Normal file
BIN
app/Microsoft.AspNetCore.Routing.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Server.IIS.dll
Normal file
BIN
app/Microsoft.AspNetCore.Server.IIS.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Server.IISIntegration.dll
Normal file
BIN
app/Microsoft.AspNetCore.Server.IISIntegration.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Server.Kestrel.Core.dll
Normal file
BIN
app/Microsoft.AspNetCore.Server.Kestrel.Core.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Server.Kestrel.Https.dll
Normal file
BIN
app/Microsoft.AspNetCore.Server.Kestrel.Https.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll
Normal file
BIN
app/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.Server.Kestrel.dll
Normal file
BIN
app/Microsoft.AspNetCore.Server.Kestrel.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.WebUtilities.dll
Normal file
BIN
app/Microsoft.AspNetCore.WebUtilities.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.AspNetCore.dll
Normal file
BIN
app/Microsoft.AspNetCore.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.Abstractions.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.Binder.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.Binder.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.CommandLine.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.CommandLine.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.EnvironmentVariables.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.EnvironmentVariables.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.FileExtensions.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.FileExtensions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.Json.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.Json.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.UserSecrets.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.UserSecrets.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Configuration.dll
Normal file
BIN
app/Microsoft.Extensions.Configuration.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.DependencyInjection.Abstractions.dll
Normal file
BIN
app/Microsoft.Extensions.DependencyInjection.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.DependencyInjection.dll
Normal file
BIN
app/Microsoft.Extensions.DependencyInjection.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.FileProviders.Abstractions.dll
Normal file
BIN
app/Microsoft.Extensions.FileProviders.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.FileProviders.Physical.dll
Normal file
BIN
app/Microsoft.Extensions.FileProviders.Physical.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.FileSystemGlobbing.dll
Normal file
BIN
app/Microsoft.Extensions.FileSystemGlobbing.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Hosting.Abstractions.dll
Normal file
BIN
app/Microsoft.Extensions.Hosting.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Logging.Abstractions.dll
Normal file
BIN
app/Microsoft.Extensions.Logging.Abstractions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Logging.Configuration.dll
Normal file
BIN
app/Microsoft.Extensions.Logging.Configuration.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Logging.Console.dll
Normal file
BIN
app/Microsoft.Extensions.Logging.Console.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Logging.Debug.dll
Normal file
BIN
app/Microsoft.Extensions.Logging.Debug.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Logging.EventSource.dll
Normal file
BIN
app/Microsoft.Extensions.Logging.EventSource.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Logging.dll
Normal file
BIN
app/Microsoft.Extensions.Logging.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.ObjectPool.dll
Normal file
BIN
app/Microsoft.Extensions.ObjectPool.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Options.ConfigurationExtensions.dll
Normal file
BIN
app/Microsoft.Extensions.Options.ConfigurationExtensions.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Options.dll
Normal file
BIN
app/Microsoft.Extensions.Options.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Extensions.Primitives.dll
Normal file
BIN
app/Microsoft.Extensions.Primitives.dll
Normal file
Binary file not shown.
BIN
app/Microsoft.Net.Http.Headers.dll
Normal file
BIN
app/Microsoft.Net.Http.Headers.dll
Normal file
Binary file not shown.
BIN
app/Newtonsoft.Json.dll
Normal file
BIN
app/Newtonsoft.Json.dll
Normal file
Binary file not shown.
BIN
app/System.IO.Pipelines.dll
Normal file
BIN
app/System.IO.Pipelines.dll
Normal file
Binary file not shown.
BIN
app/System.Runtime.CompilerServices.Unsafe.dll
Normal file
BIN
app/System.Runtime.CompilerServices.Unsafe.dll
Normal file
Binary file not shown.
8
app/docker-compose.yml
Normal file
8
app/docker-compose.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
bot:
|
||||||
|
build: .
|
||||||
|
image: mydiscordbot
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
bot:
|
||||||
|
build: .
|
||||||
|
image: mydiscordbot
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue