@bluealba/platform-cli 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1448 -0
- package/package.json +39 -0
- package/templates/application-data-template/{{applicationName}}/application.json +6 -0
- package/templates/application-data-template/{{applicationName}}/modules.json +1 -0
- package/templates/application-data-template/{{applicationName}}/operations.json +1 -0
- package/templates/application-data-template/{{applicationName}}/roles.json +1 -0
- package/templates/application-monorepo-template/.changeset/config.json +11 -0
- package/templates/application-monorepo-template/.nvmrc +1 -0
- package/templates/application-monorepo-template/.syncpackrc +4 -0
- package/templates/application-monorepo-template/package.json +31 -0
- package/templates/application-monorepo-template/packages-versions.json +1 -0
- package/templates/application-monorepo-template/scripts/preinstall.mjs +57 -0
- package/templates/application-monorepo-template/services/.gitkeep +0 -0
- package/templates/application-monorepo-template/turbo.json +26 -0
- package/templates/application-monorepo-template/ui/.gitkeep +0 -0
- package/templates/bootstrap-service-template/.eslintrc.js +27 -0
- package/templates/bootstrap-service-template/.nvmrc +1 -0
- package/templates/bootstrap-service-template/.prettierrc +4 -0
- package/templates/bootstrap-service-template/Dockerfile +14 -0
- package/templates/bootstrap-service-template/Dockerfile.development +10 -0
- package/templates/bootstrap-service-template/README.md +13 -0
- package/templates/bootstrap-service-template/package.json +38 -0
- package/templates/bootstrap-service-template/src/config.ts +6 -0
- package/templates/bootstrap-service-template/src/data/.gitkeep +0 -0
- package/templates/bootstrap-service-template/src/data/platform/modules-config.json +9 -0
- package/templates/bootstrap-service-template/src/data/platform/modules.json +1 -0
- package/templates/bootstrap-service-template/src/data/shared-libraries.json +14 -0
- package/templates/bootstrap-service-template/src/main.ts +38 -0
- package/templates/bootstrap-service-template/tsconfig.build.json +4 -0
- package/templates/bootstrap-service-template/tsconfig.json +23 -0
- package/templates/customization-ui-module-template/Dockerfile +18 -0
- package/templates/customization-ui-module-template/Dockerfile.development +10 -0
- package/templates/customization-ui-module-template/babel.config.json +36 -0
- package/templates/customization-ui-module-template/caddy/Caddyfile +25 -0
- package/templates/customization-ui-module-template/package.json +59 -0
- package/templates/customization-ui-module-template/src/components/ExpandedNavbarLogo.tsx +62 -0
- package/templates/customization-ui-module-template/src/components/ExtensionPoints/index.tsx +28 -0
- package/templates/customization-ui-module-template/src/components/Logo.tsx +55 -0
- package/templates/customization-ui-module-template/src/components/SplashLogo.tsx +52 -0
- package/templates/customization-ui-module-template/src/declarations.d.ts +41 -0
- package/templates/customization-ui-module-template/src/hooks/useDynamicStyleSheet.ts +18 -0
- package/templates/customization-ui-module-template/src/platform-customization-ui.tsx +16 -0
- package/templates/customization-ui-module-template/src/root.component.tsx +17 -0
- package/templates/customization-ui-module-template/src/styles/base.css +15 -0
- package/templates/customization-ui-module-template/src/styles/index.css +2 -0
- package/templates/customization-ui-module-template/src/styles/platform.css +125 -0
- package/templates/customization-ui-module-template/src/styles/splash.css +7 -0
- package/templates/customization-ui-module-template/tsconfig.json +12 -0
- package/templates/customization-ui-module-template/webpack.config.js +43 -0
- package/templates/nestjs-service-module-template/.env.example +3 -0
- package/templates/nestjs-service-module-template/.eslintrc.js +25 -0
- package/templates/nestjs-service-module-template/.nvmrc +1 -0
- package/templates/nestjs-service-module-template/.prettierrc +4 -0
- package/templates/nestjs-service-module-template/Dockerfile +14 -0
- package/templates/nestjs-service-module-template/Dockerfile.development +12 -0
- package/templates/nestjs-service-module-template/nest-cli.json +8 -0
- package/templates/nestjs-service-module-template/package.json +64 -0
- package/templates/nestjs-service-module-template/src/app.controller.spec.ts +22 -0
- package/templates/nestjs-service-module-template/src/app.controller.ts +12 -0
- package/templates/nestjs-service-module-template/src/app.module.ts +10 -0
- package/templates/nestjs-service-module-template/src/app.service.ts +8 -0
- package/templates/nestjs-service-module-template/src/main.ts +8 -0
- package/templates/nestjs-service-module-template/test/app.e2e-spec.ts +24 -0
- package/templates/nestjs-service-module-template/test/jest-e2e.json +9 -0
- package/templates/nestjs-service-module-template/tsconfig.build.json +4 -0
- package/templates/nestjs-service-module-template/tsconfig.json +21 -0
- package/templates/platform-init-template/core/.changeset/config.json +11 -0
- package/templates/platform-init-template/core/.nvmrc +1 -0
- package/templates/platform-init-template/core/.syncpackrc +4 -0
- package/templates/platform-init-template/core/package.json +69 -0
- package/templates/platform-init-template/core/packages-versions.json +1 -0
- package/templates/platform-init-template/core/scripts/preinstall.mjs +59 -0
- package/templates/platform-init-template/core/services/.gitkeep +0 -0
- package/templates/platform-init-template/core/turbo.json +26 -0
- package/templates/platform-init-template/core/ui/.gitkeep +0 -0
- package/templates/platform-init-template/local/.env.example +18 -0
- package/templates/platform-init-template/local/core-docker-compose.yml +27 -0
- package/templates/platform-init-template/local/docker-compose.yml +3 -0
- package/templates/platform-init-template/local/environment/pae-nestjs-gateway-service.env +34 -0
- package/templates/platform-init-template/local/nginx.conf +69 -0
- package/templates/platform-init-template/local/package.json +18 -0
- package/templates/platform-init-template/local/platform-docker-compose.yml +81 -0
- package/templates/platform-init-template/local/scripts/build.sh +18 -0
- package/templates/platform-init-template/local/scripts/install.sh +18 -0
- package/templates/platform-init-template/local/ssl/cert.pem +21 -0
- package/templates/platform-init-template/local/ssl/key.pem +28 -0
- package/templates/react-ui-module-template/.nvmrc +1 -0
- package/templates/react-ui-module-template/Dockerfile +15 -0
- package/templates/react-ui-module-template/Dockerfile.development +12 -0
- package/templates/react-ui-module-template/Dockerfile_nginx +11 -0
- package/templates/react-ui-module-template/caddy/Caddyfile +21 -0
- package/templates/react-ui-module-template/nginx/default.conf +23 -0
- package/templates/react-ui-module-template/package.json +29 -0
- package/templates/react-ui-module-template/src/Icon.tsx +7 -0
- package/templates/react-ui-module-template/src/components/Icons/BaseIconProps.ts +4 -0
- package/templates/react-ui-module-template/src/components/Icons/HomeTitleIcon.tsx +16 -0
- package/templates/react-ui-module-template/src/components/Icons/InfoContentIcon.tsx +16 -0
- package/templates/react-ui-module-template/src/declarations.d.ts +46 -0
- package/templates/react-ui-module-template/src/hooks/useDebouncedCallback.ts +21 -0
- package/templates/react-ui-module-template/src/main.module.css +10 -0
- package/templates/react-ui-module-template/src/main.tsx +19 -0
- package/templates/react-ui-module-template/src/menu.ts +65 -0
- package/templates/react-ui-module-template/src/root.component.tsx +26 -0
- package/templates/react-ui-module-template/src/services.ts +2 -0
- package/templates/react-ui-module-template/src/views/Home/Home.tsx +30 -0
- package/templates/react-ui-module-template/src/views/Home/index.ts +2 -0
- package/templates/react-ui-module-template/tsconfig.json +30 -0
- package/templates/react-ui-module-template/webpack.config.js +3 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Test, TestingModule } from '@nestjs/testing';
|
|
2
|
+
import { AppController } from './app.controller';
|
|
3
|
+
import { AppService } from './app.service';
|
|
4
|
+
|
|
5
|
+
describe('AppController', () => {
|
|
6
|
+
let appController: AppController;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
const app: TestingModule = await Test.createTestingModule({
|
|
10
|
+
controllers: [AppController],
|
|
11
|
+
providers: [AppService],
|
|
12
|
+
}).compile();
|
|
13
|
+
|
|
14
|
+
appController = app.get<AppController>(AppController);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe('root', () => {
|
|
18
|
+
it('should return "Hello World!"', () => {
|
|
19
|
+
expect(appController.getHello()).toBe('Hello World!');
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Controller, Get } from '@nestjs/common';
|
|
2
|
+
import { AppService } from './app.service';
|
|
3
|
+
|
|
4
|
+
@Controller()
|
|
5
|
+
export class AppController {
|
|
6
|
+
constructor(private readonly appService: AppService) {}
|
|
7
|
+
|
|
8
|
+
@Get()
|
|
9
|
+
getHello(): string {
|
|
10
|
+
return this.appService.getHello();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Test, TestingModule } from '@nestjs/testing';
|
|
2
|
+
import { INestApplication } from '@nestjs/common';
|
|
3
|
+
import * as request from 'supertest';
|
|
4
|
+
import { AppModule } from './../src/app.module';
|
|
5
|
+
|
|
6
|
+
describe('AppController (e2e)', () => {
|
|
7
|
+
let app: INestApplication;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
const moduleFixture: TestingModule = await Test.createTestingModule({
|
|
11
|
+
imports: [AppModule],
|
|
12
|
+
}).compile();
|
|
13
|
+
|
|
14
|
+
app = moduleFixture.createNestApplication();
|
|
15
|
+
await app.init();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('/ (GET)', () => {
|
|
19
|
+
return request(app.getHttpServer())
|
|
20
|
+
.get('/')
|
|
21
|
+
.expect(200)
|
|
22
|
+
.expect('Hello World!');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"target": "ES2021",
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"outDir": "./dist",
|
|
12
|
+
"baseUrl": "./",
|
|
13
|
+
"incremental": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"strictNullChecks": false,
|
|
16
|
+
"noImplicitAny": false,
|
|
17
|
+
"strictBindCallApply": false,
|
|
18
|
+
"forceConsistentCasingInFileNames": false,
|
|
19
|
+
"noFallthroughCasesInSwitch": false
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "restricted",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
22
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@{{organizationName}}/{{platformName}}-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"preinstall": "node ./scripts/preinstall.mjs",
|
|
7
|
+
"dev": "turbo run dev",
|
|
8
|
+
"build": "turbo run build",
|
|
9
|
+
"test": "turbo run test",
|
|
10
|
+
"lint": "turbo run lint",
|
|
11
|
+
"changeset": "changeset",
|
|
12
|
+
"check-deps": "syncpack list-mismatches",
|
|
13
|
+
"fix-deps": "syncpack fix-mismatches"
|
|
14
|
+
},
|
|
15
|
+
"packageManager": "npm@10.8.2",
|
|
16
|
+
"keywords": [],
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"description": "",
|
|
20
|
+
"workspaces": [
|
|
21
|
+
"core/*",
|
|
22
|
+
"services/*",
|
|
23
|
+
"ui/*"
|
|
24
|
+
],
|
|
25
|
+
"lint-staged": {
|
|
26
|
+
"**/package.json": [
|
|
27
|
+
"sh -c 'syncpack list-mismatches'"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"overrides": {
|
|
31
|
+
"graphql": "^16.8.1",
|
|
32
|
+
"cache-manager": "6.4.1"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"pg": "^8.13.1",
|
|
36
|
+
"pino-nestjs": "^0.1.3",
|
|
37
|
+
"prettier": "^3.4.2",
|
|
38
|
+
"reflect-metadata": "^0.2.0",
|
|
39
|
+
"source-map-support": "^0.5.21"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@changesets/cli": "^2.27.12",
|
|
43
|
+
"@faker-js/faker": "9.2.0",
|
|
44
|
+
"@nestjs/cli": "^11.0.6",
|
|
45
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
46
|
+
"@types/express-serve-static-core": "4.19.6",
|
|
47
|
+
"@types/jest": "^30.0.0",
|
|
48
|
+
"@types/jsonwebtoken": "^9.0.9",
|
|
49
|
+
"@types/ramda": "^0.30.2",
|
|
50
|
+
"@types/react": "18.3.3",
|
|
51
|
+
"@types/react-dom": "^18.3.0",
|
|
52
|
+
"@types/supertest": "^6.0.2",
|
|
53
|
+
"@types/systemjs": "^6.15.0",
|
|
54
|
+
"autocannon": "^8.0.0",
|
|
55
|
+
"glob": "^11.0.1",
|
|
56
|
+
"identity-obj-proxy": "^3.0.0",
|
|
57
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
58
|
+
"jest-html-reporter": "^3.10.2",
|
|
59
|
+
"lint-staged": "^15.5.0",
|
|
60
|
+
"nodemon": "^3.1.7",
|
|
61
|
+
"syncpack": "^13.0.3",
|
|
62
|
+
"ts-jest": "^29.4.6",
|
|
63
|
+
"ts-loader": "^9.5.2",
|
|
64
|
+
"ts-node": "^10.9.2",
|
|
65
|
+
"tsconfig-paths": "^4.2.0",
|
|
66
|
+
"turbo": "^2.3.6",
|
|
67
|
+
"typescript": "5.8.3"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { exec } from 'node:child_process';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
|
|
4
|
+
const PACKAGES_DIR = './packages';
|
|
5
|
+
const BIN_PACKAGES = [
|
|
6
|
+
'pae-ui-react-sdk',
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
(async function main() {
|
|
10
|
+
console.log('Pre Installing packages...');
|
|
11
|
+
for (const pkg of BIN_PACKAGES) {
|
|
12
|
+
if (packageExists(pkg)) {
|
|
13
|
+
console.log(`Installing ${pkg}...`);
|
|
14
|
+
await installPackage(pkg);
|
|
15
|
+
await buildPackage(pkg);
|
|
16
|
+
await installPackage(pkg);
|
|
17
|
+
} else {
|
|
18
|
+
console.warn(`Package directory for ${pkg} does not exist. Skipping...`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
console.log('Packages installed.');
|
|
22
|
+
})();
|
|
23
|
+
|
|
24
|
+
function packageExists(pkg) {
|
|
25
|
+
console.log(`looking for ${PACKAGES_DIR}/${pkg}`);
|
|
26
|
+
return existsSync(`${PACKAGES_DIR}/${pkg}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function installPackage(pkg) {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
exec(`npm install --prefer-offline --no-audit --no-fund --ignore-scripts`, {
|
|
32
|
+
cwd: `${PACKAGES_DIR}/${pkg}`,
|
|
33
|
+
}, (error, stdout, stderr) => {
|
|
34
|
+
if (error) {
|
|
35
|
+
console.error(`Failed to install ${pkg}: ${stderr}`);
|
|
36
|
+
reject(new Error(`Failed to install ${pkg}`));
|
|
37
|
+
} else {
|
|
38
|
+
console.log(stdout);
|
|
39
|
+
resolve();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function buildPackage(pkg) {
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
exec(`npm run build`, {
|
|
48
|
+
cwd: `${PACKAGES_DIR}/${pkg}`,
|
|
49
|
+
}, (error, stdout, stderr) => {
|
|
50
|
+
if (error) {
|
|
51
|
+
console.error(`Failed to build ${pkg}: ${stderr}`);
|
|
52
|
+
reject(new Error(`Failed to build ${pkg}`));
|
|
53
|
+
} else {
|
|
54
|
+
console.log(stdout);
|
|
55
|
+
resolve();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://turbo.build/schema.json",
|
|
3
|
+
"tasks": {
|
|
4
|
+
"build": {
|
|
5
|
+
"dependsOn": [
|
|
6
|
+
"^build"
|
|
7
|
+
],
|
|
8
|
+
"outputs": [
|
|
9
|
+
"dist/**"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"dev": {
|
|
13
|
+
"cache": false,
|
|
14
|
+
"persistent": true
|
|
15
|
+
},
|
|
16
|
+
"test": {
|
|
17
|
+
"dependsOn": [
|
|
18
|
+
"build"
|
|
19
|
+
],
|
|
20
|
+
"outputs": []
|
|
21
|
+
},
|
|
22
|
+
"lint": {
|
|
23
|
+
"outputs": []
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#
|
|
2
|
+
# GATEWAY
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
PAE_AUTH_JWT_SECRET=
|
|
6
|
+
PAE_GATEWAY_SERVICE_ACCESS_SECRET=
|
|
7
|
+
PAE_GATEWAY_URL=https://pae-nestjs-gateway-service:443
|
|
8
|
+
PAE_GATEWAY_HOST_URL=https://localhost:443
|
|
9
|
+
# PAE_FAVICON=/platform-customization-ui/assets/favicon.ico
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
# DB
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
PAE_DB_HOST=pae-db
|
|
16
|
+
PAE_DB=pae
|
|
17
|
+
PAE_DB_USER=postgres
|
|
18
|
+
PAE_DB_PASSWORD=
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Core Services
|
|
2
|
+
services:
|
|
3
|
+
platform-bootstrap-service:
|
|
4
|
+
build:
|
|
5
|
+
context: ../core/services/platform-bootstrap-service
|
|
6
|
+
dockerfile: Dockerfile.development
|
|
7
|
+
environment:
|
|
8
|
+
- NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
9
|
+
- SERVICE_ACCESS_NAME=platform-bootstrap-service
|
|
10
|
+
- WAIT_TIME=5000
|
|
11
|
+
- SYNC_STRATEGY=${PAE_BOOTSTRAP_SYNC_STRATEGY}
|
|
12
|
+
- GATEWAY_SERVICE_URL=${PAE_GATEWAY_URL}
|
|
13
|
+
- SERVICE_ACCESS_SECRET=${PAE_GATEWAY_SERVICE_ACCESS_SECRET}
|
|
14
|
+
volumes:
|
|
15
|
+
- ${PWD}/../:/app/out
|
|
16
|
+
depends_on:
|
|
17
|
+
pae-nestjs-gateway-service:
|
|
18
|
+
condition: service_healthy
|
|
19
|
+
|
|
20
|
+
platform-customization-ui:
|
|
21
|
+
build:
|
|
22
|
+
context: ../core/ui/platform-customization-ui
|
|
23
|
+
dockerfile: Dockerfile.development
|
|
24
|
+
ports:
|
|
25
|
+
- 9446:80
|
|
26
|
+
volumes:
|
|
27
|
+
- ${PWD}/../:/app/out
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#
|
|
2
|
+
# CORE
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
HTTP2=false
|
|
6
|
+
HTTPS=true
|
|
7
|
+
SSL_CERT_PATH=/etc/ssl/cert.pem
|
|
8
|
+
SSL_KEY_PATH=/etc/ssl/key.pem
|
|
9
|
+
NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
# DB
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
DB_CLIENT=pg
|
|
16
|
+
DB_URL=postgresql://${PAE_DB_USER}:${PAE_DB_PASSWORD}@${PAE_DB_HOST}:5432/${PAE_DB}
|
|
17
|
+
|
|
18
|
+
#
|
|
19
|
+
# LOGGING
|
|
20
|
+
#
|
|
21
|
+
|
|
22
|
+
DEBUG_MODE=true
|
|
23
|
+
LOG_LEVEL=verbose
|
|
24
|
+
LOG_JSON=false
|
|
25
|
+
|
|
26
|
+
#
|
|
27
|
+
# GATEWAY
|
|
28
|
+
#
|
|
29
|
+
|
|
30
|
+
SERVICE_ACCESS_SECRET=${PAE_GATEWAY_SERVICE_ACCESS_SECRET}
|
|
31
|
+
JWT_SECRET=${PAE_AUTH_JWT_SECRET}
|
|
32
|
+
GATEWAY_SERVICE_URL=${PAE_GATEWAY_URL}
|
|
33
|
+
FAVICON=${PAE_FAVICON}
|
|
34
|
+
# PLATFORM_ENV=local
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
events {}
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
# Example setting up an nginx server as ingress before the gateway to test a variant architecture
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
http {
|
|
8
|
+
map $http_upgrade $connection_upgrade {
|
|
9
|
+
default upgrade;
|
|
10
|
+
'' close;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
server {
|
|
14
|
+
listen 443 ssl;
|
|
15
|
+
listen [::]:443 ssl;
|
|
16
|
+
http2 on;
|
|
17
|
+
server_name pae-server;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
gzip on;
|
|
21
|
+
gzip_disable "msie6";
|
|
22
|
+
|
|
23
|
+
gzip_vary on;
|
|
24
|
+
gzip_proxied any;
|
|
25
|
+
gzip_comp_level 6;
|
|
26
|
+
gzip_buffers 16 8k;
|
|
27
|
+
gzip_http_version 1.1;
|
|
28
|
+
gzip_min_length 256;
|
|
29
|
+
|
|
30
|
+
gzip_types
|
|
31
|
+
text/plain
|
|
32
|
+
text/css
|
|
33
|
+
text/javascript
|
|
34
|
+
application/javascript
|
|
35
|
+
application/x-javascript
|
|
36
|
+
application/json
|
|
37
|
+
application/xml
|
|
38
|
+
application/rss+xml
|
|
39
|
+
application/atom+xml
|
|
40
|
+
application/xhtml+xml
|
|
41
|
+
application/vnd.ms-fontobject
|
|
42
|
+
application/x-font-ttf
|
|
43
|
+
font/opentype
|
|
44
|
+
image/svg+xml
|
|
45
|
+
image/x-icon;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
proxy_busy_buffers_size 512k;
|
|
49
|
+
proxy_buffers 4 512k;
|
|
50
|
+
proxy_buffer_size 256k;
|
|
51
|
+
|
|
52
|
+
ssl_certificate /etc/ssl/cert.pem;
|
|
53
|
+
ssl_certificate_key /etc/ssl/key.pem;
|
|
54
|
+
|
|
55
|
+
location / {
|
|
56
|
+
proxy_pass https://pae-nestjs-gateway-service;
|
|
57
|
+
proxy_set_header Host $host;
|
|
58
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
59
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
60
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
61
|
+
|
|
62
|
+
# WebSocket support
|
|
63
|
+
proxy_http_version 1.1;
|
|
64
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
65
|
+
proxy_set_header Connection $connection_upgrade;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@{{organizationName}}/{{platformName}}-local",
|
|
3
|
+
"displayName": "{{platformTitle}} Local",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Local development scripts for the {{platformTitle}} platform",
|
|
6
|
+
"private": true,
|
|
7
|
+
"scripts": {
|
|
8
|
+
"install": "./scripts/install.sh",
|
|
9
|
+
"build": "./scripts/build.sh",
|
|
10
|
+
"start": "docker compose -p tradewinds-local -f docker-compose.yml up -d --build --remove-orphans --force-recreate",
|
|
11
|
+
"stop": "docker compose -p tradewinds-local -f docker-compose.yml down",
|
|
12
|
+
"restart": "npm run stop && npm run start",
|
|
13
|
+
"destroy": "docker compose -p tradewinds-local -f docker-compose.yml down -v --rmi all"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=20"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Blue Alba Platform Core Services
|
|
2
|
+
services:
|
|
3
|
+
rproxy:
|
|
4
|
+
image: nginx
|
|
5
|
+
ports:
|
|
6
|
+
- "443:443"
|
|
7
|
+
volumes:
|
|
8
|
+
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
9
|
+
- ./ssl:/etc/ssl:ro
|
|
10
|
+
restart: always
|
|
11
|
+
|
|
12
|
+
pae-db:
|
|
13
|
+
image: postgres:16.2-alpine3.19
|
|
14
|
+
ports:
|
|
15
|
+
- 5432:5432
|
|
16
|
+
volumes:
|
|
17
|
+
- pae-db-data:/var/lib/postgresql/data
|
|
18
|
+
environment:
|
|
19
|
+
POSTGRES_USER: ${PAE_DB_USER}
|
|
20
|
+
POSTGRES_PASSWORD: ${PAE_DB_PASSWORD}
|
|
21
|
+
POSTGRES_DB: ${PAE_DB}
|
|
22
|
+
healthcheck:
|
|
23
|
+
test: ["CMD", "pg_isready", "-U", "${PAE_DB_USER}", "-d", "${PAE_DB}"]
|
|
24
|
+
interval: 10s
|
|
25
|
+
timeout: 5s
|
|
26
|
+
retries: 20
|
|
27
|
+
|
|
28
|
+
pae-nestjs-gateway-service:
|
|
29
|
+
image: bluealba-ba-docker-virtual.jfrog.io/bluealba-pae-nestjs-gateway-service:3.6.1
|
|
30
|
+
ports:
|
|
31
|
+
- 9080:80
|
|
32
|
+
- 9443:443
|
|
33
|
+
volumes:
|
|
34
|
+
- ./ssl:/etc/ssl
|
|
35
|
+
env_file:
|
|
36
|
+
- ${PWD}/environment/pae-nestjs-gateway-service.env
|
|
37
|
+
healthcheck:
|
|
38
|
+
test:
|
|
39
|
+
[
|
|
40
|
+
"CMD",
|
|
41
|
+
"node",
|
|
42
|
+
"/app/out/apps/pae-nestjs-gateway-service/src/healthcheck.js",
|
|
43
|
+
]
|
|
44
|
+
interval: 60s
|
|
45
|
+
timeout: 30s
|
|
46
|
+
retries: 5
|
|
47
|
+
start_period: 15s
|
|
48
|
+
depends_on:
|
|
49
|
+
pae-db:
|
|
50
|
+
condition: service_healthy
|
|
51
|
+
|
|
52
|
+
pae-shell-ui:
|
|
53
|
+
image: bluealba-ba-docker-virtual.jfrog.io/bluealba-pae-shell-ui:3.3.0
|
|
54
|
+
ports:
|
|
55
|
+
- 9004:80
|
|
56
|
+
|
|
57
|
+
pae-admin-ui:
|
|
58
|
+
image: bluealba-ba-docker-virtual.jfrog.io/bluealba-pae-admin-ui:4.4.0
|
|
59
|
+
ports:
|
|
60
|
+
- 9005:80
|
|
61
|
+
|
|
62
|
+
pae-documentation-ui:
|
|
63
|
+
image: bluealba-ba-docker-virtual.jfrog.io/bluealba-pae-documentation-ui:1.0.7
|
|
64
|
+
ports:
|
|
65
|
+
- 9006:80
|
|
66
|
+
|
|
67
|
+
pae-documentation:
|
|
68
|
+
image: bluealba-ba-docker-virtual.jfrog.io/bluealba-pae-documentation:1.0.7
|
|
69
|
+
ports:
|
|
70
|
+
- 8585:80
|
|
71
|
+
|
|
72
|
+
pae-rooms-service:
|
|
73
|
+
image: bluealba-ba-docker-virtual.jfrog.io/bluealba-pae-rooms-service:0.0.2
|
|
74
|
+
ports:
|
|
75
|
+
- 9406:3000
|
|
76
|
+
depends_on:
|
|
77
|
+
pae-db:
|
|
78
|
+
condition: service_healthy
|
|
79
|
+
|
|
80
|
+
volumes:
|
|
81
|
+
pae-db-data:
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
4
|
+
|
|
5
|
+
pids=()
|
|
6
|
+
for dir in "$ROOT"/*/; do
|
|
7
|
+
if [ "$dir" != "$ROOT/local/" ]; then
|
|
8
|
+
echo "Building $dir..."
|
|
9
|
+
(cd "$dir" && npm run build) &
|
|
10
|
+
pids+=($!)
|
|
11
|
+
fi
|
|
12
|
+
done
|
|
13
|
+
|
|
14
|
+
exit_code=0
|
|
15
|
+
for pid in "${pids[@]}"; do
|
|
16
|
+
wait "$pid" || exit_code=$?
|
|
17
|
+
done
|
|
18
|
+
exit $exit_code
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
4
|
+
|
|
5
|
+
pids=()
|
|
6
|
+
for dir in "$ROOT"/*/; do
|
|
7
|
+
if [ "$dir" != "$ROOT/local/" ]; then
|
|
8
|
+
echo "Installing $dir..."
|
|
9
|
+
(cd "$dir" && npm i) &
|
|
10
|
+
pids+=($!)
|
|
11
|
+
fi
|
|
12
|
+
done
|
|
13
|
+
|
|
14
|
+
exit_code=0
|
|
15
|
+
for pid in "${pids[@]}"; do
|
|
16
|
+
wait "$pid" || exit_code=$?
|
|
17
|
+
done
|
|
18
|
+
exit $exit_code
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIDazCCAlOgAwIBAgIUHwgB51D6YPI9s0APRsSOqZQoElowDQYJKoZIhvcNAQEL
|
|
3
|
+
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
|
|
4
|
+
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNTAxMjAxNjA0MTZaFw0yNjAx
|
|
5
|
+
MjAxNjA0MTZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
|
|
6
|
+
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
|
|
7
|
+
AQUAA4IBDwAwggEKAoIBAQDhBdKypbrFPsvhNWvc/YJXknUmIc/JjKtftqzqvhE9
|
|
8
|
+
ye+42vpB1v+rdleaqZSLoKxM7Uvpa7dKwV0DDynUhqgtiH5R239HuvUkYORXKqjb
|
|
9
|
+
yZUloV0bugd6EkKfJOvpWbnlmTMHiHMnFy5TFDJyjGGYX8VNBR59rVs9hphY3v+C
|
|
10
|
+
bqz7xtznU8Y5k0m/oWLlmY7kjLDMhIB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