fucked up

This commit is contained in:
2026-04-17 23:51:29 +02:00
parent 7a57197158
commit eef9c65840
4 changed files with 7 additions and 9 deletions
+2
View File
@@ -0,0 +1,2 @@
IMAGE_TAG=latest
MAIN_PORT=3000
-5
View File
@@ -1,5 +0,0 @@
{
"Server": {
"Port": 3004
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
services:
app:
image: docker.lechner-systems.at/lechnersystems/ttm:${IMAGE_TAG}
image: docker.lechner-systems.at/lechnersystems/portfolio:${IMAGE_TAG}
build:
context: .
dockerfile: Dockerfile
+4 -3
View File
@@ -6,7 +6,6 @@ import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import bootstrap from './main.server';
import ProductionConfig from '../configs/Production.json';
const serverDistFolder: string = dirname(fileURLToPath(import.meta.url));
const browserDistFolder: string = resolve(serverDistFolder, '../browser');
@@ -39,9 +38,11 @@ app.get('**', (req: Request, res: Response, next: NextFunction): void => {
});
if (isMainModule(import.meta.url)) {
const port: number = ProductionConfig.Server.Port;
const envPort: number = Number.parseInt(process.env['MAIN_PORT'] ?? '', 10);
const port: number = Number.isFinite(envPort) ? envPort : 3000;
app.listen(port, (): void => {
console.log(`✔️ Listening on Port ${port}`);
console.log(`Listening on port ${port}`);
});
}