From 6757210ae7e19b13a3aae848643f4d988d739c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=E1=BB=91ng?= Date: Sat, 22 Feb 2025 12:28:48 +0700 Subject: [PATCH] release: 0.5.6 --- sep490-enterprise/Dockerfile | 1 + .../src/main/resources/log4j2-spring.xml | 14 ++ sep490-frontend/eslint.config.mjs | 185 ------------------ .../components/footer/footer.component.html | 2 +- sep490-idp/Dockerfile | 1 + .../src/main/resources/log4j2-spring.xml | 14 ++ sep490-infrastructure/production.yml | 71 ++++++- 7 files changed, 100 insertions(+), 188 deletions(-) delete mode 100644 sep490-frontend/eslint.config.mjs diff --git a/sep490-enterprise/Dockerfile b/sep490-enterprise/Dockerfile index cfb6fc23..c2241062 100644 --- a/sep490-enterprise/Dockerfile +++ b/sep490-enterprise/Dockerfile @@ -1,6 +1,7 @@ FROM eclipse-temurin:21.0.2_13-jdk-alpine COPY build/libs/*.jar app.jar ENTRYPOINT ["java", \ + "-Dspring.profiles.active=prod", \ "-jar", \ "app.jar" \ ] diff --git a/sep490-enterprise/src/main/resources/log4j2-spring.xml b/sep490-enterprise/src/main/resources/log4j2-spring.xml index 6bd5c236..b365c2ec 100644 --- a/sep490-enterprise/src/main/resources/log4j2-spring.xml +++ b/sep490-enterprise/src/main/resources/log4j2-spring.xml @@ -5,11 +5,25 @@ + + + + \ No newline at end of file diff --git a/sep490-frontend/eslint.config.mjs b/sep490-frontend/eslint.config.mjs deleted file mode 100644 index 4b7494d5..00000000 --- a/sep490-frontend/eslint.config.mjs +++ /dev/null @@ -1,185 +0,0 @@ -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [{ - ignores: [ - "**/*.js", - "**/*.spec.ts", - "**/*demo*", - "src/index.html", - "src/environments/**/*", - "dist/**/*", - "src/main.ts", - "src/app/modules/dev/**/*", - ], -}, ...compat.extends( - "eslint:recommended", - "plugin:@typescript-eslint/eslint-plugin/recommended", - "plugin:@angular-eslint/recommended", - "plugin:@angular-eslint/template/process-inline-templates", - "plugin:prettier/recommended", -).map(config => ({ - ...config, - files: ["**/*.ts"], -})), { - files: ["**/*.ts"], - - languageOptions: { - parser: tsParser, - ecmaVersion: 5, - sourceType: "script", - - parserOptions: { - project: ["tsconfig.json"], - createDefaultProgram: true, - }, - }, - - rules: { - "@typescript-eslint/member-ordering": ["error", { - default: [ - "public-static-field", - "public-instance-field", - "protected-static-field", - "protected-instance-field", - "private-static-field", - "private-instance-field", - "public-constructor", - "protected-constructor", - "private-constructor", - "public-static-method", - "public-instance-method", - "protected-static-method", - "protected-instance-method", - "private-static-method", - "private-instance-method", - ], - }], - - "@angular-eslint/no-host-metadata-property": ["error", { - allowStatic: true, - }], - - "@angular-eslint/no-pipe-impure": "error", - "@angular-eslint/prefer-output-readonly": "error", - "@angular-eslint/relative-url-prefix": "error", - "@angular-eslint/use-component-selector": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/ban-tslint-comment": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/default-param-last": "error", - "@typescript-eslint/method-signature-style": "error", - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-optional-chain": "error", - "@typescript-eslint/prefer-readonly": "error", - "@typescript-eslint/prefer-regexp-exec": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/unified-signatures": "error", - - "@typescript-eslint/explicit-function-return-type": ["error", { - allowTypedFunctionExpressions: true, - }], - - "@typescript-eslint/no-explicit-any": "off", - "no-duplicate-imports": "error", - "dot-notation": "error", - eqeqeq: ["error", "smart"], - "guard-for-in": "error", - - "max-lines": ["error", { - max: 1000, - }], - - "max-lines-per-function": ["error", { - max: 35, - }], - - "no-bitwise": "error", - "no-caller": "error", - - "no-console": ["error", { - allow: ["info", "warn", "error"], - }], - - "no-else-return": "error", - "no-eval": "error", - "no-new-wrappers": "error", - "no-sequences": "error", - "no-throw-literal": "error", - "no-undef-init": "error", - "no-unused-expressions": "error", - "no-useless-concat": "error", - "no-useless-escape": "error", - "object-shorthand": "error", - "prefer-exponentiation-operator": "error", - "prefer-object-spread": "error", - "prefer-regex-literals": "error", - "prefer-template": "error", - radix: "error", - - "sort-imports": ["error", { - ignoreDeclarationSort: true, - }], - - "spaced-comment": "error", - - "prettier/prettier": ["error", { - endOfLine: "auto", - bracketSpacing: false, - arrowParens: "avoid", - trailingComma: "none", - tabWidth: 2, - useTabs: false, - bracketSameLine: false, - }], - }, -}, { - files: ["**/*.spec.ts"], - - rules: { - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-floating-promises": "off", - "@angular-eslint/use-component-selector": "off", - "max-lines-per-function": "off", - "max-lines": "off", - }, -}, { - files: ["**/*.decorator.ts"], - - rules: { - "max-lines-per-function": "off", - }, -}, ...compat.extends("plugin:@angular-eslint/template/recommended").map(config => ({ - ...config, - files: ["**/*.html"], -})), ...compat.extends("plugin:prettier/recommended").map(config => ({ - ...config, - files: ["**/*.html"], - ignores: ["**/*inline-template-*.component.html"], -})), { - files: ["**/*.html"], - ignores: ["**/*inline-template-*.component.html"], - - rules: { - "prettier/prettier": ["error", { - parser: "angular", - endOfLine: "auto", - tabWidth: 4, - useTabs: false, - }], - }, -}]; \ No newline at end of file diff --git a/sep490-frontend/src/app/components/footer/footer.component.html b/sep490-frontend/src/app/components/footer/footer.component.html index 5105ba24..49cc29f7 100644 --- a/sep490-frontend/src/app/components/footer/footer.component.html +++ b/sep490-frontend/src/app/components/footer/footer.component.html @@ -1 +1 @@ -

Green Building v0.0.1

+

Green Building v0.5.6 - 132e385d

diff --git a/sep490-idp/Dockerfile b/sep490-idp/Dockerfile index cfb6fc23..c2241062 100644 --- a/sep490-idp/Dockerfile +++ b/sep490-idp/Dockerfile @@ -1,6 +1,7 @@ FROM eclipse-temurin:21.0.2_13-jdk-alpine COPY build/libs/*.jar app.jar ENTRYPOINT ["java", \ + "-Dspring.profiles.active=prod", \ "-jar", \ "app.jar" \ ] diff --git a/sep490-idp/src/main/resources/log4j2-spring.xml b/sep490-idp/src/main/resources/log4j2-spring.xml index 6bd5c236..d98e0cfa 100644 --- a/sep490-idp/src/main/resources/log4j2-spring.xml +++ b/sep490-idp/src/main/resources/log4j2-spring.xml @@ -5,11 +5,25 @@ + + + + \ No newline at end of file diff --git a/sep490-infrastructure/production.yml b/sep490-infrastructure/production.yml index e9e51503..af353f2a 100644 --- a/sep490-infrastructure/production.yml +++ b/sep490-infrastructure/production.yml @@ -1,4 +1,71 @@ services: + web: + image: thongdh3401/sep490-frontend:0.5.5 + environment: + OIDC_CLIENT_ID: greenbuildings + OIDC_AUTHORITY: ${OIDC_AUTHORITY} + IDP_API: ${IDP_API} + ENTERPRISE_API: ${ENTERPRISE_API} + ports: + - "127.0.0.1:4200:4200" + depends_on: + - idp + - enterprise + enterprise: + image: thongdh3401/sep490-enterprise:0.5.6 + ports: + - "127.0.0.1:8080:8080" + environment: + CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS} + KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS} + DB_HOST: sep490_databases + DB_NAME: sep490_enterprise + DB_PORT: 5432 + ISSUER_URI: ${ISSUER_URI} + POSTGRES_USER: ${ENTERPRISE_POSTGRES_USER} + POSTGRES_PASSWORD: ${ENTERPRISE_POSTGRES_PASSWORD} + EXCHANGERATE_API_KEY: ${EXCHANGERATE_API_KEY} + PAYOS_CLIENT_ID: ${PAYOS_CLIENT_ID} + PAYOS_API_KEY: ${PAYOS_API_KEY} + PAYOS_CHECKSUM_KEY: ${PAYOS_CHECKSUM_KEY} + SPLUNK_URL: ${SPLUNK_URL} + SPLUNK_HOST: ${SPLUNK_HOST} + ENTERPRISE_SPLUNK_TOKEN: ${ENTERPRISE_SPLUNK_TOKEN} + ENTERPRISE_SPLUNK_INDEX: ${ENTERPRISE_SPLUNK_INDEX} + ENTERPRISE_SPLUNK_SOURCE: ${ENTERPRISE_SPLUNK_SOURCE} + depends_on: + - idp + - sep490_databases + - kafka + idp: + image: thongdh3401/sep490-idp:0.5.6 + ports: + - "127.0.0.1:8180:8080" + environment: + CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS} + KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS} + DB_HOST: sep490_databases + DB_NAME: sep490_idp + DB_PORT: 5432 + OIDC_CLIENT_ID: greenbuildings + OIDC_POST_LOGOUT_REDIRECT_URI: ${OIDC_REDIRECT_URI} + OIDC_REDIRECT_URI: ${OIDC_POST_LOGOUT_REDIRECT_URI} + POSTGRES_USER: ${IDP_POSTGRES_USER} + POSTGRES_PASSWORD: ${IDP_POSTGRES_PASSWORD} + SMTP_HOST: sep490_mailhog + SMTP_PORT: 1025 + SPLUNK_URL: ${SPLUNK_URL} + SPLUNK_HOST: ${SPLUNK_HOST} + IDP_SPLUNK_TOKEN: ${IDP_SPLUNK_TOKEN} + IDP_SPLUNK_INDEX: ${IDP_SPLUNK_INDEX} + IDP_SPLUNK_SOURCE: ${IDP_SPLUNK_SOURCE} + PASSKEYS_RP_NAME: ${PASSKEYS_RP_NAME} + PASSKEYS_RP_ID: ${PASSKEYS_RP_ID} + PASSKEYS_ALLOWED_ORIGINS: ${PASSKEYS_ALLOWED_ORIGINS} + depends_on: + - sep490_databases + - kafka + - sep490_mailhog sep490_databases: image: postgres:16.4 container_name: sep490_databases @@ -60,10 +127,10 @@ services: KAFKA_NODE_ID: 1 KAFKA_PROCESS_ROLES: broker,controller KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://image:9092 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT - KAFKA_CONTROLLER_QUORUM_VOTERS: 1@image:9093 + KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1