add more logging and fix some docker configs

This commit is contained in:
13xforever 2019-10-26 18:27:30 +05:00
parent ee248d9df5
commit c3c3ca5abb
3 changed files with 5 additions and 2 deletions

View File

@ -166,6 +166,7 @@ namespace CompatBot
.Build();
Log = GetLog();
LoggerFactory = new NLogLoggerFactory();
Log.Info("Log path: " + CurrentLogPath);
}
catch (Exception e)
{

View File

@ -27,9 +27,9 @@ namespace CompatBot
internal static async Task Main(string[] args)
{
Console.WriteLine("Confinement: " + SandboxDetector.Detect() ?? "None");
if (args.Length > 0 && args[0] == "--dry-run")
{
Console.WriteLine("Confinement: " + SandboxDetector.Detect());
Console.WriteLine("Database path: " + Path.GetDirectoryName(Path.GetFullPath(DbImporter.GetDbPath("fake.db", Environment.SpecialFolder.ApplicationData))));
if (Assembly.GetEntryAssembly().GetCustomAttribute<UserSecretsIdAttribute>() is UserSecretsIdAttribute attribute)
{

View File

@ -3,11 +3,13 @@ services:
bot:
image: rpcs3/discord-bot:latest
volumes:
# host_path:container_path
- /home/MY_USER_NAME/.local/share/compat-bot:/bot-db
- /home/MY_USER_NAME/.microsoft/usersecrets/c2e6548b-b215-4a18-a010-958ef294b310:/bot-config
- /var/logs/compat-bot:/src/CompatBot/logs
- /ver/ird:/var/ird
- /var/ird:/var/ird
environment:
Token: MY_BOT_TOKEN
# paths inside container
LogPath: /var/logs/compat-bot
IrdCachePath: /var/ird