feat(release): Setup automatic docker build

This commit is contained in:
Michel Fedde 2025-06-22 17:51:21 +02:00
parent a3c1bae6db
commit d5f5fe5f1a
8 changed files with 79 additions and 5 deletions

View file

@ -1,9 +1,9 @@
import dotenv from "dotenv";
import path from "node:path";
import * as fs from "node:fs";
type DiscordEnvironment = {
token: string;
guildId: string;
clientId: string;
}
@ -15,7 +15,6 @@ export class Environment {
get discord(): DiscordEnvironment {
return {
token: process.env.DISCORD_API_KEY ?? '',
guildId: process.env.DISCORD_GUILD_ID ?? '',
clientId: process.env.DISCORD_CLIENT_ID ?? '',
}
}
@ -27,8 +26,14 @@ export class Environment {
}
public setup() {
const dotenvPath = path.resolve(__dirname, "../environment/.env");
if (!fs.existsSync(dotenvPath)) {
return;
}
dotenv.config({
path: path.resolve(__dirname, "../environment/.env"),
path: dotenvPath,
});
}
}