.
This commit is contained in:
14
Templates/backend_tsconfig.tmpl
Normal file
14
Templates/backend_tsconfig.tmpl
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "commonjs",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
18
Templates/docker_compose.tmpl
Normal file
18
Templates/docker_compose.tmpl
Normal file
@@ -0,0 +1,18 @@
|
||||
version: "3.3"
|
||||
services:
|
||||
{{.DirName}}:
|
||||
image: {{.DirName}}
|
||||
container_name: {{.DirName}}_container
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- Backend
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.{{.DirName}}.rule=Host('{{.DirName}}.csnetworkx.dev')"
|
||||
- "traefik.http.routers.{{.DirName}}.entrypoints=websecure"
|
||||
- "traefik.http.services.{{.DirName}}.loadbalancer.server.port=80"
|
||||
- "traefik.http.routers.{{.DirName}}.service={{.DirName}}"
|
||||
- "traefik.http.routers.{{.DirName}}.tls.certresolver=acme"
|
||||
networks:
|
||||
Backend:
|
||||
external: true
|
||||
13
Templates/index.tmpl
Normal file
13
Templates/index.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Standard-Einstiegspunkt für die App
|
||||
import express from 'express';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
const NODE_ENV = process.env.NODE_ENV || 'dev';
|
||||
const Port = NODE_ENV === "production" ? parseInt(process.env.PORT || '') || 2210 : 2210;
|
||||
|
||||
app.listen(Port, () => {
|
||||
console.log(`Server läuft auf Port ${Port}`);
|
||||
});
|
||||
Reference in New Issue
Block a user