fucked up
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
IMAGE_TAG=latest
|
||||||
|
MAIN_PORT=3000
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"Server": {
|
|
||||||
"Port": 3004
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: docker.lechner-systems.at/lechnersystems/ttm:${IMAGE_TAG}
|
image: docker.lechner-systems.at/lechnersystems/portfolio:${IMAGE_TAG}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|||||||
+4
-3
@@ -6,7 +6,6 @@ import { dirname, join, resolve } from 'node:path';
|
|||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
import bootstrap from './main.server';
|
import bootstrap from './main.server';
|
||||||
import ProductionConfig from '../configs/Production.json';
|
|
||||||
|
|
||||||
const serverDistFolder: string = dirname(fileURLToPath(import.meta.url));
|
const serverDistFolder: string = dirname(fileURLToPath(import.meta.url));
|
||||||
const browserDistFolder: string = resolve(serverDistFolder, '../browser');
|
const browserDistFolder: string = resolve(serverDistFolder, '../browser');
|
||||||
@@ -39,9 +38,11 @@ app.get('**', (req: Request, res: Response, next: NextFunction): void => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (isMainModule(import.meta.url)) {
|
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 => {
|
app.listen(port, (): void => {
|
||||||
console.log(`✔️ Listening on Port ${port}`);
|
console.log(`Listening on port ${port}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user