mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-03 14:03:09 +00:00
28 lines
880 B
C#
28 lines
880 B
C#
using KubernetesWorkflow;
|
|
using Utils;
|
|
|
|
namespace CodexDiscordBotPlugin
|
|
{
|
|
public class DiscordBotContainerRecipe : ContainerRecipeFactory
|
|
{
|
|
public override string AppName => "discordbot-bibliotech";
|
|
public override string Image => "thatbenbierens/codex-discordbot:initial";
|
|
|
|
protected override void Initialize(StartupConfig startupConfig)
|
|
{
|
|
var config = startupConfig.Get<DiscordBotStartupConfig>();
|
|
|
|
AddEnvVar("TOKEN", config.Token);
|
|
AddEnvVar("SERVERNAME", config.ServerName);
|
|
AddEnvVar("ADMINROLE", config.AdminRoleName);
|
|
AddEnvVar("ADMINCHANNELNAME", config.AdminChannelName);
|
|
|
|
if (config.DataPath != null)
|
|
{
|
|
AddEnvVar("DATAPATH", config.DataPath);
|
|
AddVolume(config.DataPath, 1.GB());
|
|
}
|
|
}
|
|
}
|
|
}
|