feat: docker support

This commit is contained in:
Morten Olsen
2025-10-16 14:54:52 +02:00
parent 1f4b9cab04
commit b75866bbdf
9 changed files with 91 additions and 11 deletions

32
src/config/config.ts Normal file
View File

@@ -0,0 +1,32 @@
class Config {
public get tokenSecret() {
return process.env.TOKEN_SECRET;
}
public get k8s() {
const enabled = process.env.K8S_ENABLED === 'true';
return {
enabled,
};
}
public get http() {
const enabled = (process.env.HTTP_ENABLED = 'true');
const port = process.env.HTTP_PORT ? parseInt(process.env.HTTP_PORT) : 8883;
return {
enabled,
port,
};
}
public get tcp() {
const enabled = (process.env.TCP_ENABLED = 'true');
const port = process.env.TCP_PORT ? parseInt(process.env.TCP_PORT) : 1883;
return {
enabled,
port,
};
}
}
export { Config };