working on getting docker going again
This commit is contained in:
parent
59b768f1b1
commit
2b15a95e18
9 changed files with 221 additions and 79 deletions
41
.gitignore
vendored
41
.gitignore
vendored
|
|
@ -1,22 +1,23 @@
|
||||||
compile.bat
|
compile.bat
|
||||||
*.user
|
*.user
|
||||||
*.userprefs
|
*.userprefs
|
||||||
*.suo
|
*.suo
|
||||||
*.cache
|
*.cache
|
||||||
*.pfx
|
*.pfx
|
||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
[Bb]in/
|
[Bb]in/
|
||||||
packages/
|
packages/
|
||||||
.idea/
|
.idea/
|
||||||
.vs/
|
.vs/
|
||||||
/Programs/examples/TestClient/Properties/launchSettings.json
|
/Programs/examples/TestClient/Properties/launchSettings.json
|
||||||
.appveyor.yml
|
.appveyor.yml
|
||||||
LICENSE.txt
|
LICENSE.txt
|
||||||
mapgen.bat
|
mapgen.bat
|
||||||
PrimMesher/
|
PrimMesher/
|
||||||
Programs/
|
Programs/
|
||||||
libremetaverse-core/.gitignore
|
libremetaverse-core/.gitignore
|
||||||
BetterSecondbot/Dockerfile
|
BetterSecondbot/Dockerfile
|
||||||
BetterSecondbot/wiki/
|
BetterSecondbot/wiki/
|
||||||
BetterSecondbot/debug.json
|
BetterSecondbot/debug.json
|
||||||
BetterSecondbot/settings.env
|
BetterSecondbot/settings.env
|
||||||
|
SecondBotEvents/defaultBot/
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Secondbot", "Secondbot", "{
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Project Items", "Project Items", "{C343303B-F9BF-46B3-BBB5-5596823EC71C}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Project Items", "Project Items", "{C343303B-F9BF-46B3-BBB5-5596823EC71C}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.dockerignore = .dockerignore
|
||||||
.gitignore = .gitignore
|
.gitignore = .gitignore
|
||||||
Dockerfile = Dockerfile
|
SecondBotEvents\Dockerfile = SecondBotEvents\Dockerfile
|
||||||
NuGet.Config = NuGet.Config
|
NuGet.Config = NuGet.Config
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
|
oldDockerfile. = oldDockerfile.
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecondBotEvents", "SecondBotEvents\SecondBotEvents.csproj", "{571AB1AF-4C74-4C37-AC5B-9B63383AC791}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecondBotEvents", "SecondBotEvents\SecondBotEvents.csproj", "{571AB1AF-4C74-4C37-AC5B-9B63383AC791}"
|
||||||
|
|
|
||||||
57
Dockerfile
57
Dockerfile
|
|
@ -1,57 +0,0 @@
|
||||||
#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/runtime:3.1-buster-slim AS base
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
|
|
||||||
WORKDIR /src
|
|
||||||
COPY ["BetterSecondbot/BetterSecondbot.csproj", "BetterSecondbot/"]
|
|
||||||
COPY ["Core/Core.csproj", "Core/"]
|
|
||||||
COPY ["Shared/Shared.csproj", "Shared/"]
|
|
||||||
COPY ["LibreMetaverse/LibreMetaverse.csproj", "LibreMetaverse/"]
|
|
||||||
COPY ["LibreMetaverse.StructuredData/LibreMetaverse.StructuredData.csproj", "LibreMetaverse.StructuredData/"]
|
|
||||||
COPY ["LibreMetaverse.Types/LibreMetaverse.Types.csproj", "LibreMetaverse.Types/"]
|
|
||||||
RUN dotnet restore "BetterSecondbot/BetterSecondbot.csproj"
|
|
||||||
COPY . .
|
|
||||||
WORKDIR "/src/BetterSecondbot"
|
|
||||||
RUN dotnet build "BetterSecondbot.csproj" -c Release -o /app/build
|
|
||||||
|
|
||||||
FROM build AS publish
|
|
||||||
RUN dotnet publish "BetterSecondbot.csproj" -c Release -o /app/publish
|
|
||||||
|
|
||||||
FROM base AS final
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=publish /app/publish .
|
|
||||||
# --- Update your settings ---
|
|
||||||
|
|
||||||
ENV Basic_BotUserName='' \
|
|
||||||
Basic_BotPassword='' \
|
|
||||||
Basic_HomeRegions='Viserion/50/140/23' \
|
|
||||||
Basic_AvoidRestartRegions='Just the Tip/60/96/1490' \
|
|
||||||
Basic_LoginLocation='home' \
|
|
||||||
Security_MasterUsername='' \
|
|
||||||
Security_SubMasters='' \
|
|
||||||
Security_SignedCommandkey='' \
|
|
||||||
Security_WebUIKey='' \
|
|
||||||
Setting_AllowFunds='false' \
|
|
||||||
Setting_loginURI='secondlife' \
|
|
||||||
Setting_Tracker='Event' \
|
|
||||||
DiscordFull_Enable='false' \
|
|
||||||
DiscordFull_Token='' \
|
|
||||||
DiscordFull_ServerID='' \
|
|
||||||
DiscordFull_Keep_GroupChat='false' \
|
|
||||||
Http_Enable='false' \
|
|
||||||
Http_Host='docker' \
|
|
||||||
Log2File_Enable='false' \
|
|
||||||
Log2File_Level='1' \
|
|
||||||
Setting_LogCommands='false' \
|
|
||||||
Agent_Channel='auto' \
|
|
||||||
Agent_Version='auto' \
|
|
||||||
OBJECT_CHAT='false'
|
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
ENV ASPNETCORE_URLS http://+:80
|
|
||||||
|
|
||||||
# --- End of settings ---
|
|
||||||
|
|
||||||
ENTRYPOINT ["/app/BetterSecondbot"]
|
|
||||||
86
SecondBotEvents/Dockerfile
Normal file
86
SecondBotEvents/Dockerfile
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["NuGet.Config", "."]
|
||||||
|
COPY ["SecondBotEvents/SecondBotEvents.csproj", "SecondBotEvents/"]
|
||||||
|
COPY ["LibreMetaverse/LibreMetaverse.csproj", "LibreMetaverse/"]
|
||||||
|
COPY ["LibreMetaverse.StructuredData/LibreMetaverse.StructuredData.csproj", "LibreMetaverse.StructuredData/"]
|
||||||
|
COPY ["LibreMetaverse.Types/LibreMetaverse.Types.csproj", "LibreMetaverse.Types/"]
|
||||||
|
RUN dotnet restore "SecondBotEvents/SecondBotEvents.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/SecondBotEvents"
|
||||||
|
RUN dotnet build "SecondBotEvents.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
RUN dotnet publish "SecondBotEvents.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
|
||||||
|
ENV basic_Username = 'SecondbotR5' \
|
||||||
|
basic_Password = '' \
|
||||||
|
basic_LoginURI = 'secondlife' \
|
||||||
|
commands_AllowFundsCommands = 'false' \
|
||||||
|
commands_AllowIMcontrol = 'false' \
|
||||||
|
commands_SharedSecret = 'examplecode' \
|
||||||
|
commands_EnableMasterControls = 'true' \
|
||||||
|
commands_MastersCSV = 'Madpeter Zond' \
|
||||||
|
commands_EnforceTimeWindow = 'false' \
|
||||||
|
commands_TimeWindowSecs = 35 \
|
||||||
|
datastore_AutoCleanAvatars = 'true' \
|
||||||
|
datastore_AvatarsCleanAfterMins = 10 \
|
||||||
|
datastore_LocalChatHistoryLimit = 120 \
|
||||||
|
datastore_GroupChatHistoryLimitPerGroup = 50 \
|
||||||
|
datastore_ImChatHistoryLimit = 50 \
|
||||||
|
datastore_PrefetchGroupMembers = 'true' \
|
||||||
|
datastore_PrefetchGroupRoles = 'false' \
|
||||||
|
datastore_PrefetchEstateBanlist = 'true' \
|
||||||
|
datastore_AutoCleanKeyValueStore = 'true' \
|
||||||
|
datastore_CleanKeyValueStoreAfterMins = 10 \
|
||||||
|
datastore_CommandHistoryLimit = 30 \
|
||||||
|
discord_Enabled = 'false' \
|
||||||
|
discord_ServerID = '' \
|
||||||
|
discord_ClientToken = '' \
|
||||||
|
discord_AllowDiscordCommands = 'false' \
|
||||||
|
events_Enabled = 'false' \
|
||||||
|
events_GroupMemberJoins = 'false' \
|
||||||
|
events_GroupMemberLeaves = 'false' \
|
||||||
|
events_GroupMemberEventsGroupUUID = '' \
|
||||||
|
events_GuestEntersArea = 'false' \
|
||||||
|
events_GuestLeavesArea = 'false' \
|
||||||
|
events_GuestTrackingSimname = '' \
|
||||||
|
events_GuestTrackingParcelname = '' \
|
||||||
|
events_SimAlertMessage = 'false' \
|
||||||
|
events_StatusMessage = 'false' \
|
||||||
|
events_MoneyEvent = 'false' \
|
||||||
|
events_ChangeSim = 'false' \
|
||||||
|
events_ChangeParcel = 'false' \
|
||||||
|
events_OutputChannel = -1 \
|
||||||
|
events_OutputIMuuid = '00000000-0000-0000-0000-000000000000' \
|
||||||
|
events_OutputHttpURL = 'none' \
|
||||||
|
events_OutputSecret = 'notset' \
|
||||||
|
homebound_Enabled = 'false' \
|
||||||
|
homebound_HomeSimSlUrl = '' \
|
||||||
|
homebound_BackupSimSLUrl = '' \
|
||||||
|
homebound_AtHomeSeekLocation = 'false' \
|
||||||
|
homebound_AtBackupSeekLocation = 'false' \
|
||||||
|
homebound_AtHomeAutoSitUuid = '00000000-0000-0000-0000-000000000000' \
|
||||||
|
http_Enabled = 'false' \
|
||||||
|
http_Port = 80 \
|
||||||
|
Enabled = 'true' \
|
||||||
|
AcceptTeleports = 'false' \
|
||||||
|
AcceptGroupInvites = 'false' \
|
||||||
|
AcceptInventory = 'false' \
|
||||||
|
AcceptFriendRequests = 'false' \
|
||||||
|
EnableJsonOutputEvents = 'false' \
|
||||||
|
JsonOutputEventsTarget = 'none'
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
ENV ASPNETCORE_URLS http://+:80
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "SecondBotEvents.dll"]
|
||||||
|
|
@ -83,7 +83,7 @@ namespace SecondBotEvents
|
||||||
protected bool exitNow = false;
|
protected bool exitNow = false;
|
||||||
public EventsSecondBot(string[] args)
|
public EventsSecondBot(string[] args)
|
||||||
{
|
{
|
||||||
if (SecondbotHelpers.notempty(Environment.GetEnvironmentVariable("basic_username")) == true)
|
if (SecondbotHelpers.notempty(Environment.GetEnvironmentVariable("basic_Username")) == true)
|
||||||
{
|
{
|
||||||
fromEnv = true;
|
fromEnv = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
SecondBotEvents/Properties/launchSettings.json
Normal file
10
SecondBotEvents/Properties/launchSettings.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"SecondBotEvents": {
|
||||||
|
"commandName": "Project"
|
||||||
|
},
|
||||||
|
"Docker": {
|
||||||
|
"commandName": "Docker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,12 +6,15 @@
|
||||||
<MSBuildGitHashCommand>git rev-parse --short HEAD</MSBuildGitHashCommand>
|
<MSBuildGitHashCommand>git rev-parse --short HEAD</MSBuildGitHashCommand>
|
||||||
<MSBuildGitHashValidate>False</MSBuildGitHashValidate>
|
<MSBuildGitHashValidate>False</MSBuildGitHashValidate>
|
||||||
<MSBuildGitHashSuppressDirtyWarning>False</MSBuildGitHashSuppressDirtyWarning>
|
<MSBuildGitHashSuppressDirtyWarning>False</MSBuildGitHashSuppressDirtyWarning>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
|
<DockerfileRunEnvironmentFiles>settings.env</DockerfileRunEnvironmentFiles>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Discord.Net" Version="3.11.0" />
|
<PackageReference Include="Discord.Net" Version="3.11.0" />
|
||||||
<PackageReference Include="Discord.Net.WebSocket" Version="3.11.0" />
|
<PackageReference Include="Discord.Net.WebSocket" Version="3.11.0" />
|
||||||
<PackageReference Include="EmbedIO" Version="3.5.2" />
|
<PackageReference Include="EmbedIO" Version="3.5.2" />
|
||||||
<PackageReference Include="Microsoft.NET.Build.Containers" Version="7.0.306" />
|
<PackageReference Include="Microsoft.NET.Build.Containers" Version="7.0.306" />
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
|
||||||
<PackageReference Include="MSBuildGitHash" Version="2.0.2">
|
<PackageReference Include="MSBuildGitHash" Version="2.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|
|
||||||
2
SecondBotEvents/settings.env
Normal file
2
SecondBotEvents/settings.env
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
basic_Username=SecondbotR5
|
||||||
|
basic_Password=
|
||||||
95
oldDockerfile
Normal file
95
oldDockerfile
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
#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/sdk:7.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["BetterSecondbot/BetterSecondbot.csproj", "BetterSecondbot/"]
|
||||||
|
COPY ["Core/Core.csproj", "Core/"]
|
||||||
|
COPY ["Shared/Shared.csproj", "Shared/"]
|
||||||
|
COPY ["LibreMetaverse/LibreMetaverse.csproj", "LibreMetaverse/"]
|
||||||
|
COPY ["LibreMetaverse.StructuredData/LibreMetaverse.StructuredData.csproj", "LibreMetaverse.StructuredData/"]
|
||||||
|
COPY ["LibreMetaverse.Types/LibreMetaverse.Types.csproj", "LibreMetaverse.Types/"]
|
||||||
|
RUN dotnet restore "BetterSecondbot/BetterSecondbot.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/BetterSecondbot"
|
||||||
|
RUN dotnet publish "BetterSecondbot.csproj" -c Release -o /app/publish
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/runtime:7.0
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
# --- Update your settings ---
|
||||||
|
|
||||||
|
ENV
|
||||||
|
#-- basic
|
||||||
|
basic_Username = '' \
|
||||||
|
basic_Password = '' \
|
||||||
|
basic_LoginURI = 'secondlife' \
|
||||||
|
#-- commands
|
||||||
|
commands_AllowFundsCommands = 'false' \
|
||||||
|
commands_AllowIMcontrol = 'false' \
|
||||||
|
commands_SharedSecret = 'examplecode' \
|
||||||
|
commands_EnableMasterControls = 'true' \
|
||||||
|
commands_MastersCSV = 'Madpeter Zond' \
|
||||||
|
commands_EnforceTimeWindow = 'false' \
|
||||||
|
commands_TimeWindowSecs = 35 \
|
||||||
|
#-- datastore
|
||||||
|
datastore_AutoCleanAvatars = 'true' \
|
||||||
|
datastore_AvatarsCleanAfterMins = 10 \
|
||||||
|
datastore_LocalChatHistoryLimit = 120 \
|
||||||
|
datastore_GroupChatHistoryLimitPerGroup = 50 \
|
||||||
|
datastore_ImChatHistoryLimit = 50 \
|
||||||
|
datastore_PrefetchGroupMembers = 'true' \
|
||||||
|
datastore_PrefetchGroupRoles = 'false' \
|
||||||
|
datastore_PrefetchEstateBanlist = 'true' \
|
||||||
|
datastore_AutoCleanKeyValueStore = 'true' \
|
||||||
|
datastore_CleanKeyValueStoreAfterMins = 10 \
|
||||||
|
datastore_CommandHistoryLimit = 30 \
|
||||||
|
#-- discord
|
||||||
|
discord_Enabled = 'false' \
|
||||||
|
discord_ServerID = '' \
|
||||||
|
discord_ClientToken = '' \
|
||||||
|
discord_AllowDiscordCommands = 'false' \
|
||||||
|
#-- events
|
||||||
|
events_Enabled = 'false' \
|
||||||
|
events_GroupMemberJoins = 'false' \
|
||||||
|
events_GroupMemberLeaves = 'false' \
|
||||||
|
events_GroupMemberEventsGroupUUID = '' \
|
||||||
|
events_GuestEntersArea = 'false' \
|
||||||
|
events_GuestLeavesArea = 'false' \
|
||||||
|
events_GuestTrackingSimname = '' \
|
||||||
|
events_GuestTrackingParcelname = '' \
|
||||||
|
events_SimAlertMessage = 'false' \
|
||||||
|
events_StatusMessage = 'false' \
|
||||||
|
events_MoneyEvent = 'false' \
|
||||||
|
events_ChangeSim = 'false' \
|
||||||
|
events_ChangeParcel = 'false' \
|
||||||
|
events_OutputChannel = -1 \
|
||||||
|
events_OutputIMuuid = '00000000-0000-0000-0000-000000000000' \
|
||||||
|
events_OutputHttpURL = 'none' \
|
||||||
|
events_OutputSecret = 'notset' \
|
||||||
|
#-- homebound
|
||||||
|
homebound_Enabled = 'false' \
|
||||||
|
homebound_HomeSimSlUrl = '' \
|
||||||
|
homebound_BackupSimSLUrl = '' \
|
||||||
|
homebound_AtHomeSeekLocation = 'false' \
|
||||||
|
homebound_AtBackupSeekLocation = 'false' \
|
||||||
|
homebound_AtHomeAutoSitUuid = '00000000-0000-0000-0000-000000000000' \
|
||||||
|
#-- http
|
||||||
|
http_Enabled = 'false' \
|
||||||
|
http_Port = 80 \
|
||||||
|
#-- interactions
|
||||||
|
Enabled = 'true' \
|
||||||
|
AcceptTeleports = 'false' \
|
||||||
|
AcceptGroupInvites = 'false' \
|
||||||
|
AcceptInventory = 'false' \
|
||||||
|
AcceptFriendRequests = 'false' \
|
||||||
|
EnableJsonOutputEvents = 'false' \
|
||||||
|
JsonOutputEventsTarget = 'none'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
ENV ASPNETCORE_URLS http://+:80
|
||||||
|
|
||||||
|
# --- End of settings ---
|
||||||
|
|
||||||
|
ENTRYPOINT ["/app/BetterSecondbot"]
|
||||||
Loading…
Reference in a new issue