diff --git a/.github/workflows/main.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/ci.yml diff --git a/.prettierignore b/.prettierignore index 27da80bd..5f3e857a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,5 +5,5 @@ .angular /chart **/CHANGELOG.md -/apps/marcolongo.cloud/chart/* -/apps/marcolongo.cloud-api/chart/* +/apps/app/chart/* +/apps/api/chart/* diff --git a/Tiltfile b/Tiltfile index 2cc61a32..bd139503 100644 --- a/Tiltfile +++ b/Tiltfile @@ -7,24 +7,26 @@ print( """.strip() ) -allow_k8s_contexts("admin@marcolongo.cloud") - +# SECTION: APP +# --- docker_build( - "marcolongo.cloud-app", + "app", context=".", - dockerfile="./apps/marcolongo.cloud/Dockerfile", + dockerfile="./apps/app/Dockerfile", only=[ - "./dist/apps/marcolongo.cloud/browser", + "./dist/apps/app/browser/", + "./apps/app/nginx.conf", ], live_update=[ - sync("./dist/apps/marcolongo.cloud/browser", "/usr/share/nginx/html/") + sync("./dist/apps/app/browser", "/usr/share/nginx/html/"), + sync("./apps/app/nginx.conf", "/etc/nginx/conf.d/default.conf"), ], ) local_resource( "serve:app:dev", - serve_cmd="npm run serve:app:dev", + serve_cmd="npx nx run app:serve:development", labels=["app"], trigger_mode=TRIGGER_MODE_AUTO, auto_init=False, @@ -33,27 +35,29 @@ local_resource( local_resource( "build:app:dev", - serve_cmd="npm run build:app:dev -- --watch", + serve_cmd="npx nx run app:build:development -- --watch", labels=["app"], trigger_mode=TRIGGER_MODE_AUTO, auto_init=False, ) +# SECTION: API +# --- docker_build( - "marcolongo.cloud-api", + "api", context=".", - dockerfile="./apps/marcolongo.cloud-api/Dockerfile", + dockerfile="./apps/api/Dockerfile", only=[ - "./dist/apps/marcolongo.cloud-api", + "./dist/apps/api", ], - live_update=[sync("./dist/apps/marcolongo.cloud-api", "/app")], - target="dev", + live_update=[sync("./dist/apps/api", "/app")], + target="development", ) local_resource( "build:api:dev", - serve_cmd="npm run build:api:dev -- --watch", + serve_cmd="npx nx run api:build:development -- --watch", labels=["api"], trigger_mode=TRIGGER_MODE_AUTO, auto_init=False, @@ -61,17 +65,21 @@ local_resource( local_resource( "serve:api:dev", - serve_cmd="npm run serve:api:dev", + serve_cmd="npx nx run api:serve:development", labels=["api"], trigger_mode=TRIGGER_MODE_AUTO, auto_init=False, links=[link("http://localhost:3000", "api")], ) +# SECTION: K8s +# --- +k8s_yaml(helm("./chart", "marcolongo-cloud", "marcolongo-cloud", "./chart/values.yaml")) + k8s_resource( "marcolongo-cloud-app", port_forwards=[ - port_forward(4200, name="web"), + port_forward(80, name="web"), ], labels=["app"], auto_init=False, @@ -86,9 +94,11 @@ k8s_resource( auto_init=False, ) +# SECTION: Storybook +# ------------------ local_resource( - "marcolongo.cloud", - serve_cmd="npm run storybook:app", + "app", + serve_cmd="npx nx run app:storybook", links=[link("http://localhost:4400", "storybook")], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False, @@ -97,7 +107,7 @@ local_resource( local_resource( "common-ui", - serve_cmd="npm run storybook:common-ui", + serve_cmd="npx nx run common-ui:storybook", links=[link("http://localhost:4401", "storybook")], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False, @@ -106,7 +116,7 @@ local_resource( local_resource( "core", - serve_cmd="npm run storybook:core", + serve_cmd="npx nx run core:storybook", links=[link("http://localhost:4402", "storybook")], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False, @@ -115,23 +125,28 @@ local_resource( local_resource( "gradient-os", - serve_cmd="npm run storybook:gradient-os", + serve_cmd="npx nx run gradient-os:storybook", links=[link("http://localhost:4403", "storybook")], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False, labels=["storybook"], ) +# SECTION: Tests +# -------------- local_resource( "test:unit", - serve_cmd="npm run test:unit -- --watch --parallel 10", + serve_cmd="npx nx run-many --target=test --parallel 10 --configuration ci -- --watch", trigger_mode=TRIGGER_MODE_MANUAL, labels=["tests"], ) + +# SECTION: E2E +# ------------ local_resource( "test:e2e", - cmd="npm run test:e2e -- --parallel 10", + cmd="npx nx run-many --target=e2e --parallel 10", trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False, labels=["tests"], diff --git a/apps/marcolongo.cloud-api-e2e/.eslintrc.json b/apps/api-e2e/.eslintrc.json similarity index 100% rename from apps/marcolongo.cloud-api-e2e/.eslintrc.json rename to apps/api-e2e/.eslintrc.json diff --git a/apps/marcolongo.cloud-api-e2e/jest.config.ts b/apps/api-e2e/jest.config.ts similarity index 80% rename from apps/marcolongo.cloud-api-e2e/jest.config.ts rename to apps/api-e2e/jest.config.ts index 629adf88..b2774ae8 100644 --- a/apps/marcolongo.cloud-api-e2e/jest.config.ts +++ b/apps/api-e2e/jest.config.ts @@ -1,5 +1,5 @@ export default { - displayName: 'marcolongo.cloud-api-e2e', + displayName: 'api', preset: '../../jest.preset.js', globalSetup: '/src/support/global-setup.ts', globalTeardown: '/src/support/global-teardown.ts', @@ -14,5 +14,5 @@ export default { ], }, moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/marcolongo.cloud-api-e2e', + coverageDirectory: '../../coverage/api-e2e', }; diff --git a/apps/api-e2e/package.json b/apps/api-e2e/package.json new file mode 100644 index 00000000..636eeb1b --- /dev/null +++ b/apps/api-e2e/package.json @@ -0,0 +1,4 @@ +{ + "name": "@marcolongo.cloud/api-e2e", + "version": "0.0.0" +} diff --git a/apps/marcolongo.cloud-api-e2e/project.json b/apps/api-e2e/project.json similarity index 62% rename from apps/marcolongo.cloud-api-e2e/project.json rename to apps/api-e2e/project.json index c1864109..935905f3 100644 --- a/apps/marcolongo.cloud-api-e2e/project.json +++ b/apps/api-e2e/project.json @@ -1,8 +1,8 @@ { - "name": "marcolongo.cloud-api-e2e", + "name": "api-e2e", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "application", - "implicitDependencies": ["marcolongo.cloud-api"], + "implicitDependencies": ["api"], "targets": { "lint": { "executor": "@nx/eslint:lint" @@ -11,10 +11,10 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{e2eProjectRoot}"], "options": { - "jestConfig": "apps/marcolongo.cloud-api-e2e/jest.config.ts", + "jestConfig": "apps/api-e2e/jest.config.ts", "passWithNoTests": true }, - "dependsOn": ["marcolongo.cloud-api:build"] + "dependsOn": ["api:build"] } } } diff --git a/apps/marcolongo.cloud-api-e2e/src/marcolongo.cloud-api/marcolongo.cloud-api.spec.ts b/apps/api-e2e/src/api/api.spec.ts similarity index 100% rename from apps/marcolongo.cloud-api-e2e/src/marcolongo.cloud-api/marcolongo.cloud-api.spec.ts rename to apps/api-e2e/src/api/api.spec.ts diff --git a/apps/marcolongo.cloud-api-e2e/src/support/global-setup.ts b/apps/api-e2e/src/support/global-setup.ts similarity index 91% rename from apps/marcolongo.cloud-api-e2e/src/support/global-setup.ts rename to apps/api-e2e/src/support/global-setup.ts index a9daff37..1d6c4567 100644 --- a/apps/marcolongo.cloud-api-e2e/src/support/global-setup.ts +++ b/apps/api-e2e/src/support/global-setup.ts @@ -5,7 +5,7 @@ export default async function setup() { console.log('\nSetting up...\n'); // Start the API server. - const server = spawn('nx', ['run', 'marcolongo.cloud-api:serve'], { + const server = spawn('nx', ['run', 'api:serve'], { shell: true, stdio: 'pipe', }); diff --git a/apps/marcolongo.cloud-api-e2e/src/support/global-teardown.ts b/apps/api-e2e/src/support/global-teardown.ts similarity index 100% rename from apps/marcolongo.cloud-api-e2e/src/support/global-teardown.ts rename to apps/api-e2e/src/support/global-teardown.ts diff --git a/apps/marcolongo.cloud-api-e2e/src/support/test-setup.ts b/apps/api-e2e/src/support/test-setup.ts similarity index 100% rename from apps/marcolongo.cloud-api-e2e/src/support/test-setup.ts rename to apps/api-e2e/src/support/test-setup.ts diff --git a/apps/marcolongo.cloud-api-e2e/tsconfig.json b/apps/api-e2e/tsconfig.json similarity index 100% rename from apps/marcolongo.cloud-api-e2e/tsconfig.json rename to apps/api-e2e/tsconfig.json diff --git a/apps/marcolongo.cloud-api-e2e/tsconfig.spec.json b/apps/api-e2e/tsconfig.spec.json similarity index 100% rename from apps/marcolongo.cloud-api-e2e/tsconfig.spec.json rename to apps/api-e2e/tsconfig.spec.json diff --git a/apps/marcolongo.cloud-api/.eslintrc.json b/apps/api/.eslintrc.json similarity index 100% rename from apps/marcolongo.cloud-api/.eslintrc.json rename to apps/api/.eslintrc.json diff --git a/apps/marcolongo.cloud-api/Dockerfile b/apps/api/Dockerfile similarity index 76% rename from apps/marcolongo.cloud-api/Dockerfile rename to apps/api/Dockerfile index 9fb1f90a..da3e747b 100644 --- a/apps/marcolongo.cloud-api/Dockerfile +++ b/apps/api/Dockerfile @@ -3,24 +3,23 @@ FROM node:lts-alpine as deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --no-cache libc6-compat WORKDIR /app -COPY dist/apps/marcolongo.cloud-api/package*.json ./ +COPY dist/apps/api/package*.json ./ RUN npm install --omit=dev # Production image, copy all the files and run nest -FROM node:lts-alpine as dev +FROM node:lts-alpine as development RUN apk add --no-cache dumb-init RUN npm i -g nodemon -ENV NODE_ENV production +ENV NODE_ENV development ENV PORT 3000 WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/package.json ./package.json -COPY dist/apps/marcolongo.cloud-api . -RUN chown -R node:node . +COPY dist/apps/api/ . USER node EXPOSE 3000 -CMD ["dumb-init", "nodemon", "main.js"] +CMD ["nodemon", "main.js"] # Production image, copy all the files and run nest FROM node:lts-alpine as prod @@ -30,8 +29,7 @@ ENV PORT 3000 WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/package.json ./package.json -COPY dist/apps/marcolongo.cloud-api . -RUN chown -R node:node . +COPY dist/apps/api . USER node EXPOSE 3000 CMD ["dumb-init", "node", "main.js"] diff --git a/apps/marcolongo.cloud-api/chart/.helmignore b/apps/api/chart/.helmignore similarity index 100% rename from apps/marcolongo.cloud-api/chart/.helmignore rename to apps/api/chart/.helmignore diff --git a/apps/api/chart/Chart.lock b/apps/api/chart/Chart.lock new file mode 100644 index 00000000..04870428 --- /dev/null +++ b/apps/api/chart/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 15.5.21 +digest: sha256:818af7619e898e3cc8c98f0caea0df5719e391a343b641d01a74d08221d4fc46 +generated: "2024-08-13T17:14:59.9970171-07:00" diff --git a/apps/api/chart/Chart.yaml b/apps/api/chart/Chart.yaml new file mode 100644 index 00000000..8c9cf444 --- /dev/null +++ b/apps/api/chart/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: api +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: '1.16.0' + +dependencies: + - name: postgresql + condition: postgresql.enabled + version: 15.5.21 + repository: https://charts.bitnami.com/bitnami diff --git a/apps/marcolongo.cloud-api/chart/templates/NOTES.txt b/apps/api/chart/templates/NOTES.txt similarity index 100% rename from apps/marcolongo.cloud-api/chart/templates/NOTES.txt rename to apps/api/chart/templates/NOTES.txt diff --git a/apps/marcolongo.cloud-api/chart/templates/_helpers.tpl b/apps/api/chart/templates/_helpers.tpl similarity index 100% rename from apps/marcolongo.cloud-api/chart/templates/_helpers.tpl rename to apps/api/chart/templates/_helpers.tpl diff --git a/apps/marcolongo.cloud/chart/templates/deployment.yaml b/apps/api/chart/templates/deployment.yaml similarity index 98% rename from apps/marcolongo.cloud/chart/templates/deployment.yaml rename to apps/api/chart/templates/deployment.yaml index 9fa17678..62354ea6 100644 --- a/apps/marcolongo.cloud/chart/templates/deployment.yaml +++ b/apps/api/chart/templates/deployment.yaml @@ -37,7 +37,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - name: http + - name: api containerPort: {{ .Values.service.port }} protocol: TCP livenessProbe: diff --git a/apps/marcolongo.cloud-api/chart/templates/hpa.yaml b/apps/api/chart/templates/hpa.yaml similarity index 100% rename from apps/marcolongo.cloud-api/chart/templates/hpa.yaml rename to apps/api/chart/templates/hpa.yaml diff --git a/apps/marcolongo.cloud-api/chart/templates/ingress.yaml b/apps/api/chart/templates/ingress.yaml similarity index 100% rename from apps/marcolongo.cloud-api/chart/templates/ingress.yaml rename to apps/api/chart/templates/ingress.yaml diff --git a/apps/api/chart/templates/service.yaml b/apps/api/chart/templates/service.yaml new file mode 100644 index 00000000..63abf3a6 --- /dev/null +++ b/apps/api/chart/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chart.fullname" . }} + labels: + {{- include "chart.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: api + protocol: TCP + name: api + selector: + {{- include "chart.selectorLabels" . | nindent 4 }} diff --git a/apps/marcolongo.cloud-api/chart/templates/serviceaccount.yaml b/apps/api/chart/templates/serviceaccount.yaml similarity index 100% rename from apps/marcolongo.cloud-api/chart/templates/serviceaccount.yaml rename to apps/api/chart/templates/serviceaccount.yaml diff --git a/apps/marcolongo.cloud-api/chart/templates/tests/test-connection.yaml b/apps/api/chart/templates/tests/test-connection.yaml similarity index 100% rename from apps/marcolongo.cloud-api/chart/templates/tests/test-connection.yaml rename to apps/api/chart/templates/tests/test-connection.yaml diff --git a/apps/marcolongo.cloud-api/chart/values.yaml b/apps/api/chart/values.yaml similarity index 95% rename from apps/marcolongo.cloud-api/chart/values.yaml rename to apps/api/chart/values.yaml index ca336cbe..5adc9cac 100644 --- a/apps/marcolongo.cloud-api/chart/values.yaml +++ b/apps/api/chart/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: nginx + repository: api pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: '' @@ -43,7 +43,7 @@ securityContext: service: type: ClusterIP - port: 80 + port: 3000 ingress: enabled: false @@ -77,12 +77,12 @@ resources: livenessProbe: httpGet: - path: / - port: http + path: /api + port: api readinessProbe: httpGet: - path: / - port: http + path: /api + port: api autoscaling: enabled: false @@ -109,3 +109,6 @@ nodeSelector: {} tolerations: [] affinity: {} + +postgresql: + enabled: false diff --git a/apps/marcolongo.cloud-api/jest.config.ts b/apps/api/jest.config.ts similarity index 68% rename from apps/marcolongo.cloud-api/jest.config.ts rename to apps/api/jest.config.ts index 572a6fa6..f4c5a497 100644 --- a/apps/marcolongo.cloud-api/jest.config.ts +++ b/apps/api/jest.config.ts @@ -1,10 +1,10 @@ export default { - displayName: 'marcolongo.cloud-api', + displayName: 'api', preset: '../../jest.preset.js', testEnvironment: 'node', transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], }, moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/apps/marcolongo.cloud-api', + coverageDirectory: '../../coverage/apps/api', }; diff --git a/apps/marcolongo.cloud-api/package.json b/apps/api/package.json similarity index 84% rename from apps/marcolongo.cloud-api/package.json rename to apps/api/package.json index 91e84bb0..6b96dbf6 100644 --- a/apps/marcolongo.cloud-api/package.json +++ b/apps/api/package.json @@ -1,5 +1,5 @@ { - "name": "@marcolongo.cloud/marcolongo.cloud-api", + "name": "@marcolongo.cloud/api", "version": "0.0.0", "dependencies": { "@nestjs/common": "^10.0.2", diff --git a/apps/marcolongo.cloud-api/project.json b/apps/api/project.json similarity index 68% rename from apps/marcolongo.cloud-api/project.json rename to apps/api/project.json index f0957c6e..aded5930 100644 --- a/apps/marcolongo.cloud-api/project.json +++ b/apps/api/project.json @@ -1,7 +1,7 @@ { - "name": "marcolongo.cloud-api", + "name": "api", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "apps/marcolongo.cloud-api/src", + "sourceRoot": "apps/api/src", "projectType": "application", "tags": [], "targets": { @@ -10,14 +10,14 @@ "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { - "outputPath": "dist/apps/marcolongo.cloud-api", - "main": "apps/marcolongo.cloud-api/src/main.ts", - "tsConfig": "apps/marcolongo.cloud-api/tsconfig.app.json", - "webpackConfig": "apps/marcolongo.cloud-api/webpack.config.ts", + "outputPath": "dist/apps/api", + "main": "apps/api/src/main.ts", + "tsConfig": "apps/api/tsconfig.app.json", + "webpackConfig": "apps/api/webpack.config.ts", "assets": [ { "glob": "**/*", - "input": "apps/marcolongo.cloud-api/src/assets", + "input": "apps/api/src/assets", "output": "/assets" } ] @@ -28,14 +28,14 @@ "sourceMap": true, "extractLicenses": false, "inspect": true, - "webpackConfig": "apps/marcolongo.cloud-api/webpack-hmr.config.ts" + "webpackConfig": "apps/api/webpack-hmr.config.ts" }, "production": { "optimization": true, "sourceMap": false, "extractLicenses": true, "inspect": false, - "webpackConfig": "apps/marcolongo.cloud-api/webpack.config.ts" + "webpackConfig": "apps/api/webpack.config.ts" } } }, @@ -43,14 +43,14 @@ "executor": "@nx/js:node", "defaultConfiguration": "development", "options": { - "buildTarget": "marcolongo.cloud-api:build" + "buildTarget": "api:build" }, "configurations": { "development": { - "buildTarget": "marcolongo.cloud-api:build:development" + "buildTarget": "api:build:development" }, "production": { - "buildTarget": "marcolongo.cloud-api:build:production" + "buildTarget": "api:build:production" } } }, @@ -58,7 +58,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/marcolongo.cloud-api/jest.config.ts" + "jestConfig": "apps/api/jest.config.ts" } }, "container": { @@ -67,7 +67,7 @@ "options": { "engine": "docker", "metadata": { - "images": ["marcolongo.cloud-api"], + "images": ["api"], "load": true, "tags": [ "type=schedule", @@ -86,14 +86,19 @@ "executor": "@nx-extensions/helm:package", "outputs": ["{options.outputFolder}"], "options": { - "chartFolder": "apps/marcolongo.cloud-api/chart", + "chartFolder": "apps/api/chart", "outputFolder": "{workspaceRoot}/dist/charts/{projectRoot}", "push": false, "remote": "oci://localhost:5000/helm-charts", "dependencies": { "update": true, "build": true, - "repositories": [] + "repositories": [ + { + "name": "bitnami", + "url": "https://charts.bitnami.com/bitnami" + } + ] } } } diff --git a/apps/marcolongo.cloud-api/src/app/app.controller.spec.ts b/apps/api/src/app/app.controller.spec.ts similarity index 100% rename from apps/marcolongo.cloud-api/src/app/app.controller.spec.ts rename to apps/api/src/app/app.controller.spec.ts diff --git a/apps/marcolongo.cloud-api/src/app/app.controller.ts b/apps/api/src/app/app.controller.ts similarity index 100% rename from apps/marcolongo.cloud-api/src/app/app.controller.ts rename to apps/api/src/app/app.controller.ts diff --git a/apps/marcolongo.cloud-api/src/app/app.module.ts b/apps/api/src/app/app.module.ts similarity index 100% rename from apps/marcolongo.cloud-api/src/app/app.module.ts rename to apps/api/src/app/app.module.ts diff --git a/apps/marcolongo.cloud-api/src/app/app.service.spec.ts b/apps/api/src/app/app.service.spec.ts similarity index 100% rename from apps/marcolongo.cloud-api/src/app/app.service.spec.ts rename to apps/api/src/app/app.service.spec.ts diff --git a/apps/marcolongo.cloud-api/src/app/app.service.ts b/apps/api/src/app/app.service.ts similarity index 100% rename from apps/marcolongo.cloud-api/src/app/app.service.ts rename to apps/api/src/app/app.service.ts diff --git a/apps/marcolongo.cloud-api/src/assets/.gitkeep b/apps/api/src/assets/.gitkeep similarity index 100% rename from apps/marcolongo.cloud-api/src/assets/.gitkeep rename to apps/api/src/assets/.gitkeep diff --git a/apps/marcolongo.cloud-api/src/config/globals.ts b/apps/api/src/config/globals.ts similarity index 100% rename from apps/marcolongo.cloud-api/src/config/globals.ts rename to apps/api/src/config/globals.ts diff --git a/apps/marcolongo.cloud-api/src/main.ts b/apps/api/src/main.ts similarity index 100% rename from apps/marcolongo.cloud-api/src/main.ts rename to apps/api/src/main.ts diff --git a/apps/marcolongo.cloud-api/tsconfig.app.json b/apps/api/tsconfig.app.json similarity index 100% rename from apps/marcolongo.cloud-api/tsconfig.app.json rename to apps/api/tsconfig.app.json diff --git a/apps/marcolongo.cloud-api/tsconfig.json b/apps/api/tsconfig.json similarity index 100% rename from apps/marcolongo.cloud-api/tsconfig.json rename to apps/api/tsconfig.json diff --git a/apps/marcolongo.cloud-api/tsconfig.spec.json b/apps/api/tsconfig.spec.json similarity index 100% rename from apps/marcolongo.cloud-api/tsconfig.spec.json rename to apps/api/tsconfig.spec.json diff --git a/apps/marcolongo.cloud-api/webpack-hmr.config.ts b/apps/api/webpack-hmr.config.ts similarity index 96% rename from apps/marcolongo.cloud-api/webpack-hmr.config.ts rename to apps/api/webpack-hmr.config.ts index c5f1b00e..2ea1331b 100644 --- a/apps/marcolongo.cloud-api/webpack-hmr.config.ts +++ b/apps/api/webpack-hmr.config.ts @@ -67,7 +67,7 @@ const config: Configuration = { plugins: [...pluginFactory()], output: { // eslint-disable-next-line unicorn/prefer-module - path: join(__dirname, '../../dist/apps/marcolongo.cloud-api'), + path: join(__dirname, '../../dist/apps/api'), filename: 'main.js', }, }; diff --git a/apps/marcolongo.cloud-api/webpack.config.ts b/apps/api/webpack.config.ts similarity index 91% rename from apps/marcolongo.cloud-api/webpack.config.ts rename to apps/api/webpack.config.ts index 27f43fad..83a25053 100644 --- a/apps/marcolongo.cloud-api/webpack.config.ts +++ b/apps/api/webpack.config.ts @@ -8,7 +8,7 @@ const config: Configuration = { entry: './src/main.ts', output: { // eslint-disable-next-line unicorn/prefer-module - path: join(__dirname, '../../dist/apps/marcolongo.cloud-api'), + path: join(__dirname, '../../dist/apps/api'), filename: 'main.js', }, resolve: { diff --git a/apps/marcolongo.cloud-e2e/.eslintrc.json b/apps/app-e2e/.eslintrc.json similarity index 100% rename from apps/marcolongo.cloud-e2e/.eslintrc.json rename to apps/app-e2e/.eslintrc.json diff --git a/apps/marcolongo.cloud-e2e/cypress.config.ts b/apps/app-e2e/cypress.config.ts similarity index 63% rename from apps/marcolongo.cloud-e2e/cypress.config.ts rename to apps/app-e2e/cypress.config.ts index 50cb9e75..6a50fa77 100644 --- a/apps/marcolongo.cloud-e2e/cypress.config.ts +++ b/apps/app-e2e/cypress.config.ts @@ -7,10 +7,10 @@ export default defineConfig({ ...nxE2EPreset(__filename, { cypressDir: 'src', webServerCommands: { - default: 'nx run marcolongo.cloud:serve:development', - production: 'nx run marcolongo.cloud:serve:production', + default: 'nx run app:serve:development', + production: 'nx run app:serve:production', }, - ciWebServerCommand: 'nx run marcolongo.cloud:serve-static', + ciWebServerCommand: 'nx run app:serve-static', }), baseUrl: 'http://localhost:4200', }, diff --git a/apps/app-e2e/package.json b/apps/app-e2e/package.json new file mode 100644 index 00000000..a54f22cc --- /dev/null +++ b/apps/app-e2e/package.json @@ -0,0 +1,4 @@ +{ + "name": "@marcolongo.cloud/app-e2e", + "version": "0.0.0" +} diff --git a/apps/marcolongo.cloud-e2e/project.json b/apps/app-e2e/project.json similarity index 59% rename from apps/marcolongo.cloud-e2e/project.json rename to apps/app-e2e/project.json index 1d27dc44..4072487a 100644 --- a/apps/marcolongo.cloud-e2e/project.json +++ b/apps/app-e2e/project.json @@ -1,10 +1,10 @@ { - "name": "marcolongo.cloud-e2e", + "name": "app-e2e", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "application", - "sourceRoot": "apps/marcolongo.cloud-e2e/src", + "sourceRoot": "apps/app-e2e/src", "tags": [], - "implicitDependencies": ["marcolongo.cloud"], + "implicitDependencies": ["app"], "targets": { "lint": { "executor": "@nx/eslint:lint" diff --git a/apps/marcolongo.cloud-e2e/src/e2e/app.cy.ts b/apps/app-e2e/src/e2e/app.cy.ts similarity index 89% rename from apps/marcolongo.cloud-e2e/src/e2e/app.cy.ts rename to apps/app-e2e/src/e2e/app.cy.ts index 57fab583..01a46a57 100644 --- a/apps/marcolongo.cloud-e2e/src/e2e/app.cy.ts +++ b/apps/app-e2e/src/e2e/app.cy.ts @@ -1,6 +1,6 @@ import { getGreeting } from '../support/app.po'; -describe('marcolongo.cloud-e2e', () => { +describe('app-e2e', () => { beforeEach(() => cy.visit('/')); it('should display welcome message', () => { diff --git a/apps/marcolongo.cloud-e2e/src/fixtures/example.json b/apps/app-e2e/src/fixtures/example.json similarity index 100% rename from apps/marcolongo.cloud-e2e/src/fixtures/example.json rename to apps/app-e2e/src/fixtures/example.json diff --git a/apps/marcolongo.cloud-e2e/src/support/app.po.ts b/apps/app-e2e/src/support/app.po.ts similarity index 100% rename from apps/marcolongo.cloud-e2e/src/support/app.po.ts rename to apps/app-e2e/src/support/app.po.ts diff --git a/apps/marcolongo.cloud-e2e/src/support/commands.ts b/apps/app-e2e/src/support/commands.ts similarity index 100% rename from apps/marcolongo.cloud-e2e/src/support/commands.ts rename to apps/app-e2e/src/support/commands.ts diff --git a/apps/marcolongo.cloud-e2e/src/support/e2e.ts b/apps/app-e2e/src/support/e2e.ts similarity index 100% rename from apps/marcolongo.cloud-e2e/src/support/e2e.ts rename to apps/app-e2e/src/support/e2e.ts diff --git a/apps/marcolongo.cloud-e2e/tsconfig.json b/apps/app-e2e/tsconfig.json similarity index 100% rename from apps/marcolongo.cloud-e2e/tsconfig.json rename to apps/app-e2e/tsconfig.json diff --git a/apps/marcolongo.cloud/.eslintrc.json b/apps/app/.eslintrc.json similarity index 100% rename from apps/marcolongo.cloud/.eslintrc.json rename to apps/app/.eslintrc.json diff --git a/apps/marcolongo.cloud/.storybook/main.ts b/apps/app/.storybook/main.ts similarity index 100% rename from apps/marcolongo.cloud/.storybook/main.ts rename to apps/app/.storybook/main.ts diff --git a/apps/marcolongo.cloud/.storybook/preview.ts b/apps/app/.storybook/preview.ts similarity index 100% rename from apps/marcolongo.cloud/.storybook/preview.ts rename to apps/app/.storybook/preview.ts diff --git a/apps/marcolongo.cloud/.storybook/tsconfig.json b/apps/app/.storybook/tsconfig.json similarity index 100% rename from apps/marcolongo.cloud/.storybook/tsconfig.json rename to apps/app/.storybook/tsconfig.json diff --git a/apps/marcolongo.cloud/.stylelintrc.json b/apps/app/.stylelintrc.json similarity index 100% rename from apps/marcolongo.cloud/.stylelintrc.json rename to apps/app/.stylelintrc.json diff --git a/apps/app/Dockerfile b/apps/app/Dockerfile new file mode 100644 index 00000000..3fc2629a --- /dev/null +++ b/apps/app/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:stable-alpine +COPY dist/apps/app/browser/ /usr/share/nginx/html/ +COPY apps/app/nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/apps/marcolongo.cloud/chart/.helmignore b/apps/app/chart/.helmignore similarity index 100% rename from apps/marcolongo.cloud/chart/.helmignore rename to apps/app/chart/.helmignore diff --git a/apps/app/chart/Chart.lock b/apps/app/chart/Chart.lock new file mode 100644 index 00000000..321dd740 --- /dev/null +++ b/apps/app/chart/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: api + repository: file://../../api/chart + version: 0.1.0 +digest: sha256:29ee9129082e4aa56d6a42898542ad761d59012e306555bd50a866e60a59dffe +generated: "2024-08-13T17:15:53.4336783-07:00" diff --git a/apps/app/chart/Chart.yaml b/apps/app/chart/Chart.yaml new file mode 100644 index 00000000..d2cc4107 --- /dev/null +++ b/apps/app/chart/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: app +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: '1.16.0' +dependencies: + - name: api + condition: api.enabled + version: 0.1.0 + repository: 'file://../../api/chart' diff --git a/apps/marcolongo.cloud/chart/templates/NOTES.txt b/apps/app/chart/templates/NOTES.txt similarity index 100% rename from apps/marcolongo.cloud/chart/templates/NOTES.txt rename to apps/app/chart/templates/NOTES.txt diff --git a/apps/marcolongo.cloud/chart/templates/_helpers.tpl b/apps/app/chart/templates/_helpers.tpl similarity index 100% rename from apps/marcolongo.cloud/chart/templates/_helpers.tpl rename to apps/app/chart/templates/_helpers.tpl diff --git a/apps/marcolongo.cloud-api/chart/templates/deployment.yaml b/apps/app/chart/templates/deployment.yaml similarity index 100% rename from apps/marcolongo.cloud-api/chart/templates/deployment.yaml rename to apps/app/chart/templates/deployment.yaml diff --git a/apps/marcolongo.cloud/chart/templates/hpa.yaml b/apps/app/chart/templates/hpa.yaml similarity index 100% rename from apps/marcolongo.cloud/chart/templates/hpa.yaml rename to apps/app/chart/templates/hpa.yaml diff --git a/apps/marcolongo.cloud/chart/templates/ingress.yaml b/apps/app/chart/templates/ingress.yaml similarity index 100% rename from apps/marcolongo.cloud/chart/templates/ingress.yaml rename to apps/app/chart/templates/ingress.yaml diff --git a/apps/app/chart/templates/service.yaml b/apps/app/chart/templates/service.yaml new file mode 100644 index 00000000..dfc5b3a3 --- /dev/null +++ b/apps/app/chart/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "chart.fullname" . }} + labels: + {{- include "chart.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "chart.selectorLabels" . | nindent 4 }} diff --git a/apps/marcolongo.cloud/chart/templates/serviceaccount.yaml b/apps/app/chart/templates/serviceaccount.yaml similarity index 100% rename from apps/marcolongo.cloud/chart/templates/serviceaccount.yaml rename to apps/app/chart/templates/serviceaccount.yaml diff --git a/apps/marcolongo.cloud/chart/templates/tests/test-connection.yaml b/apps/app/chart/templates/tests/test-connection.yaml similarity index 100% rename from apps/marcolongo.cloud/chart/templates/tests/test-connection.yaml rename to apps/app/chart/templates/tests/test-connection.yaml diff --git a/apps/marcolongo.cloud/chart/values.yaml b/apps/app/chart/values.yaml similarity index 92% rename from apps/marcolongo.cloud/chart/values.yaml rename to apps/app/chart/values.yaml index 74e6d6c1..e5af1854 100644 --- a/apps/marcolongo.cloud/chart/values.yaml +++ b/apps/app/chart/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: ghcr.io/marcolongol/marcolongo.cloud-app + repository: app pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: '' @@ -63,17 +63,16 @@ ingress: # - chart-example.local resources: - {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 100m + memory: 128Mi livenessProbe: httpGet: @@ -85,7 +84,7 @@ readinessProbe: port: http autoscaling: - enabled: false + enabled: true minReplicas: 1 maxReplicas: 100 targetCPUUtilizationPercentage: 80 diff --git a/apps/marcolongo.cloud/jest.config.ts b/apps/app/jest.config.ts similarity index 86% rename from apps/marcolongo.cloud/jest.config.ts rename to apps/app/jest.config.ts index e08f7b65..964653e4 100644 --- a/apps/marcolongo.cloud/jest.config.ts +++ b/apps/app/jest.config.ts @@ -1,8 +1,8 @@ export default { - displayName: 'marcolongo.cloud', + displayName: 'app', preset: '../../jest.preset.js', setupFilesAfterEnv: ['/src/test-setup.ts'], - coverageDirectory: '../../coverage/apps/marcolongo.cloud', + coverageDirectory: '../../coverage/apps/app', transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/app/nginx.conf b/apps/app/nginx.conf new file mode 100644 index 00000000..c0c91c07 --- /dev/null +++ b/apps/app/nginx.conf @@ -0,0 +1,68 @@ +# Define a shared memory zone for rate limiting +limit_req_zone $binary_remote_addr zone=api:10m rate=3r/s; + +server { + listen 80; + listen [::]:80; + server_name localhost; + + access_log /var/log/nginx/host.access.log main; + error_log /var/log/nginx/host.error.log; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + # Proxy API requests to the backend + location /api { + limit_req zone=api burst=5 nodelay; + proxy_pass http://marcolongo-cloud-api:3000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # Gzip compression + gzip on; + gzip_comp_level 6; + gzip_vary on; + gzip_min_length 1000; + gzip_proxied any; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/apps/marcolongo.cloud/package.json b/apps/app/package.json similarity index 86% rename from apps/marcolongo.cloud/package.json rename to apps/app/package.json index de7fa75f..968eab07 100644 --- a/apps/marcolongo.cloud/package.json +++ b/apps/app/package.json @@ -1,5 +1,5 @@ { - "name": "@marcolongo.cloud/marcolongo.cloud", + "name": "@marcolongo.cloud/app", "version": "0.0.0", "dependencies": { "@angular/common": "~18.2.0", diff --git a/apps/marcolongo.cloud/project.json b/apps/app/project.json similarity index 72% rename from apps/marcolongo.cloud/project.json rename to apps/app/project.json index dcda691b..dd42d307 100644 --- a/apps/marcolongo.cloud/project.json +++ b/apps/app/project.json @@ -1,9 +1,9 @@ { - "name": "marcolongo.cloud", + "name": "app", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "application", "prefix": "app", - "sourceRoot": "apps/marcolongo.cloud/src", + "sourceRoot": "apps/app/src", "tags": [], "targets": { "build": { @@ -16,18 +16,18 @@ } ], "options": { - "outputPath": "dist/apps/marcolongo.cloud", + "outputPath": "dist/apps/app", "stylePreprocessorOptions": { "includePaths": ["libs/common-ui/src/styles"] }, - "index": "apps/marcolongo.cloud/src/index.html", - "browser": "apps/marcolongo.cloud/src/main.ts", + "index": "apps/app/src/index.html", + "browser": "apps/app/src/main.ts", "polyfills": ["zone.js"], - "tsConfig": "apps/marcolongo.cloud/tsconfig.app.json", + "tsConfig": "apps/app/tsconfig.app.json", "inlineStyleLanguage": "scss", "allowedCommonJsDependencies": ["@pdftron/webviewer"], "assets": [ - "apps/marcolongo.cloud/src/assets", + "apps/app/src/assets", { "input": "./libs/common-ui/src/assets", "glob": "**/*", @@ -39,7 +39,7 @@ "output": "/assets" } ], - "styles": ["apps/marcolongo.cloud/src/styles.scss"], + "styles": ["apps/app/src/styles.scss"], "scripts": [ { "input": "./libs/common-ui/webviewer/src/assets/webviewer/webviewer.min.js" @@ -63,8 +63,8 @@ "outputHashing": "all", "fileReplacements": [ { - "replace": "apps/marcolongo.cloud/src/environments/environment.ts", - "with": "apps/marcolongo.cloud/src/environments/environment.production.ts" + "replace": "apps/app/src/environments/environment.ts", + "with": "apps/app/src/environments/environment.production.ts" } ] }, @@ -76,8 +76,8 @@ "sourceMap": true, "fileReplacements": [ { - "replace": "apps/marcolongo.cloud/src/environments/environment.ts", - "with": "apps/marcolongo.cloud/src/environments/environment.development.ts" + "replace": "apps/app/src/environments/environment.ts", + "with": "apps/app/src/environments/environment.development.ts" } ] } @@ -87,7 +87,7 @@ "serve": { "executor": "@angular-devkit/build-angular:dev-server", "options": { - "proxyConfig": "apps/marcolongo.cloud/proxy.conf.json", + "proxyConfig": "apps/app/proxy.conf.json", "verbose": true }, "dependsOn": [ @@ -98,11 +98,11 @@ ], "configurations": { "production": { - "buildTarget": "marcolongo.cloud:build:production" + "buildTarget": "app:build:production" }, "development": { "hmr": true, - "buildTarget": "marcolongo.cloud:build:development", + "buildTarget": "app:build:development", "host": "0.0.0.0", "allowedHosts": ["*"] } @@ -112,7 +112,7 @@ "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", "options": { - "buildTarget": "marcolongo.cloud:build" + "buildTarget": "app:build" } }, "lint": { @@ -122,15 +122,15 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "apps/marcolongo.cloud/jest.config.ts" + "jestConfig": "apps/app/jest.config.ts" } }, "serve-static": { "executor": "@nx/web:file-server", "options": { - "buildTarget": "marcolongo.cloud:build", + "buildTarget": "app:build", "port": 4200, - "staticFilePath": "dist/apps/marcolongo.cloud/browser", + "staticFilePath": "dist/apps/app/browser", "spa": true } }, @@ -141,22 +141,22 @@ "engine": "docker", "push": true, "metadata": { - "images": ["ghcr.io/marcolongol/marcolongo.cloud-app"], + "images": ["ghcr.io/marcolongol/app"], "tags": [ "type=schedule", "type=ref,event=branch", "type=ref,event=tag", "type=ref,event=pr", "type=raw,value=production", - "type=match,pattern=marcolongo.cloud@(.*),group=1", + "type=match,pattern=app@(.*),group=1", "type=semver,pattern={{version}}", "type=semver,pattern={{major}}.{{minor}}", "type=semver,pattern={{major}}", "type=sha" ], "labels": [ - "org.opencontainers.image.title=marcolongo.cloud-app", - "org.opencontainers.image.description=marcolongo.cloud-app", + "org.opencontainers.image.title=app", + "org.opencontainers.image.description=app", "org.opencontainers.image.url=https://github.com/marcolongol/marcolongo.cloud", "org.opencontainers.image.source=https://github.com/marcolongol/marcolongo.cloud", "org.opencontainers.image.vendor=marcolongol", @@ -167,7 +167,7 @@ "configurations": { "development": { "metadata": { - "images": ["ghcr.io/marcolongol/marcolongo.cloud-app"], + "images": ["ghcr.io/marcolongol/app"], "tags": ["type=raw,value=development", "type=schedule", "type=sha"] } } @@ -178,21 +178,18 @@ "executor": "nx-stylelint:lint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": [ - "apps/marcolongo.cloud/**/*.css", - "apps/marcolongo.cloud/**/*.scss" - ] + "lintFilePatterns": ["apps/app/**/*.css", "apps/app/**/*.scss"] } }, "storybook": { "executor": "@storybook/angular:start-storybook", "options": { "port": 4400, - "configDir": "apps/marcolongo.cloud/.storybook", - "browserTarget": "marcolongo.cloud:build", + "configDir": "apps/app/.storybook", + "browserTarget": "app:build", "compodoc": false, "assets": [ - "apps/marcolongo.cloud/src/assets", + "apps/app/src/assets", { "input": "./libs/common-ui/src/assets", "glob": "**/*", @@ -215,14 +212,14 @@ "executor": "@storybook/angular:build-storybook", "outputs": ["{options.outputDir}"], "options": { - "outputDir": "dist/storybook/marcolongo.cloud", - "configDir": "apps/marcolongo.cloud/.storybook", - "browserTarget": "marcolongo.cloud:build", + "outputDir": "dist/storybook/app", + "configDir": "apps/app/.storybook", + "browserTarget": "app:build", "debugWebpack": true, "loglevel": "verbose", "compodoc": false, "assets": [ - "apps/marcolongo.cloud/src/assets", + "apps/app/src/assets", { "input": "./libs/common-ui/src/assets", "glob": "**/*", @@ -244,19 +241,19 @@ "test-storybook": { "executor": "nx:run-commands", "options": { - "command": "test-storybook -c apps/marcolongo.cloud/.storybook --url=http://localhost:4400" + "command": "test-storybook -c apps/app/.storybook --url=http://localhost:4400" } }, "static-storybook": { "executor": "@nx/web:file-server", "options": { - "buildTarget": "marcolongo.cloud:build-storybook", - "staticFilePath": "dist/storybook/marcolongo.cloud", + "buildTarget": "app:build-storybook", + "staticFilePath": "dist/storybook/app", "spa": true }, "configurations": { "ci": { - "buildTarget": "marcolongo.cloud:build-storybook:ci" + "buildTarget": "app:build-storybook:ci" } } }, @@ -264,7 +261,7 @@ "executor": "@nx-extensions/helm:package", "outputs": ["{options.outputFolder}"], "options": { - "chartFolder": "apps/marcolongo.cloud/chart", + "chartFolder": "apps/app/chart", "outputFolder": "{workspaceRoot}/dist/charts/{projectRoot}", "push": false, "remote": "oci://localhost:5000/helm-charts", diff --git a/apps/marcolongo.cloud/proxy.conf.json b/apps/app/proxy.conf.json similarity index 100% rename from apps/marcolongo.cloud/proxy.conf.json rename to apps/app/proxy.conf.json diff --git a/apps/marcolongo.cloud/src/app/app.component.html b/apps/app/src/app/app.component.html similarity index 100% rename from apps/marcolongo.cloud/src/app/app.component.html rename to apps/app/src/app/app.component.html diff --git a/apps/marcolongo.cloud/src/app/app.component.scss b/apps/app/src/app/app.component.scss similarity index 100% rename from apps/marcolongo.cloud/src/app/app.component.scss rename to apps/app/src/app/app.component.scss diff --git a/apps/marcolongo.cloud/src/app/app.component.spec.ts b/apps/app/src/app/app.component.spec.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/app.component.spec.ts rename to apps/app/src/app/app.component.spec.ts diff --git a/apps/marcolongo.cloud/src/app/app.component.stories.ts b/apps/app/src/app/app.component.stories.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/app.component.stories.ts rename to apps/app/src/app/app.component.stories.ts diff --git a/apps/marcolongo.cloud/src/app/app.component.ts b/apps/app/src/app/app.component.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/app.component.ts rename to apps/app/src/app/app.component.ts diff --git a/apps/marcolongo.cloud/src/app/app.config.ts b/apps/app/src/app/app.config.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/app.config.ts rename to apps/app/src/app/app.config.ts diff --git a/apps/marcolongo.cloud/src/app/app.routes.ts b/apps/app/src/app/app.routes.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/app.routes.ts rename to apps/app/src/app/app.routes.ts diff --git a/apps/marcolongo.cloud/src/app/components/home/home.component.html b/apps/app/src/app/components/home/home.component.html similarity index 100% rename from apps/marcolongo.cloud/src/app/components/home/home.component.html rename to apps/app/src/app/components/home/home.component.html diff --git a/apps/marcolongo.cloud/src/app/components/home/home.component.scss b/apps/app/src/app/components/home/home.component.scss similarity index 100% rename from apps/marcolongo.cloud/src/app/components/home/home.component.scss rename to apps/app/src/app/components/home/home.component.scss diff --git a/apps/marcolongo.cloud/src/app/components/home/home.component.spec.ts b/apps/app/src/app/components/home/home.component.spec.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/components/home/home.component.spec.ts rename to apps/app/src/app/components/home/home.component.spec.ts diff --git a/apps/marcolongo.cloud/src/app/components/home/home.component.stories.ts b/apps/app/src/app/components/home/home.component.stories.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/components/home/home.component.stories.ts rename to apps/app/src/app/components/home/home.component.stories.ts diff --git a/apps/marcolongo.cloud/src/app/components/home/home.component.ts b/apps/app/src/app/components/home/home.component.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/components/home/home.component.ts rename to apps/app/src/app/components/home/home.component.ts diff --git a/apps/marcolongo.cloud/src/app/components/not-found/not-found.component.html b/apps/app/src/app/components/not-found/not-found.component.html similarity index 100% rename from apps/marcolongo.cloud/src/app/components/not-found/not-found.component.html rename to apps/app/src/app/components/not-found/not-found.component.html diff --git a/apps/marcolongo.cloud/src/app/components/not-found/not-found.component.scss b/apps/app/src/app/components/not-found/not-found.component.scss similarity index 100% rename from apps/marcolongo.cloud/src/app/components/not-found/not-found.component.scss rename to apps/app/src/app/components/not-found/not-found.component.scss diff --git a/apps/marcolongo.cloud/src/app/components/not-found/not-found.component.spec.ts b/apps/app/src/app/components/not-found/not-found.component.spec.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/components/not-found/not-found.component.spec.ts rename to apps/app/src/app/components/not-found/not-found.component.spec.ts diff --git a/apps/marcolongo.cloud/src/app/components/not-found/not-found.component.stories.ts b/apps/app/src/app/components/not-found/not-found.component.stories.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/components/not-found/not-found.component.stories.ts rename to apps/app/src/app/components/not-found/not-found.component.stories.ts diff --git a/apps/marcolongo.cloud/src/app/components/not-found/not-found.component.ts b/apps/app/src/app/components/not-found/not-found.component.ts similarity index 100% rename from apps/marcolongo.cloud/src/app/components/not-found/not-found.component.ts rename to apps/app/src/app/components/not-found/not-found.component.ts diff --git a/apps/marcolongo.cloud/src/assets/.gitkeep b/apps/app/src/assets/.gitkeep similarity index 100% rename from apps/marcolongo.cloud/src/assets/.gitkeep rename to apps/app/src/assets/.gitkeep diff --git a/apps/marcolongo.cloud/src/assets/favicon.ico b/apps/app/src/assets/favicon.ico similarity index 100% rename from apps/marcolongo.cloud/src/assets/favicon.ico rename to apps/app/src/assets/favicon.ico diff --git a/apps/marcolongo.cloud/src/environments/environment.base.ts b/apps/app/src/environments/environment.base.ts similarity index 100% rename from apps/marcolongo.cloud/src/environments/environment.base.ts rename to apps/app/src/environments/environment.base.ts diff --git a/apps/marcolongo.cloud/src/environments/environment.development.ts b/apps/app/src/environments/environment.development.ts similarity index 100% rename from apps/marcolongo.cloud/src/environments/environment.development.ts rename to apps/app/src/environments/environment.development.ts diff --git a/apps/marcolongo.cloud/src/environments/environment.production.ts b/apps/app/src/environments/environment.production.ts similarity index 100% rename from apps/marcolongo.cloud/src/environments/environment.production.ts rename to apps/app/src/environments/environment.production.ts diff --git a/apps/marcolongo.cloud/src/environments/environment.ts b/apps/app/src/environments/environment.ts similarity index 100% rename from apps/marcolongo.cloud/src/environments/environment.ts rename to apps/app/src/environments/environment.ts diff --git a/apps/marcolongo.cloud/src/index.html b/apps/app/src/index.html similarity index 100% rename from apps/marcolongo.cloud/src/index.html rename to apps/app/src/index.html diff --git a/apps/marcolongo.cloud/src/main.ts b/apps/app/src/main.ts similarity index 100% rename from apps/marcolongo.cloud/src/main.ts rename to apps/app/src/main.ts diff --git a/apps/marcolongo.cloud/src/shared/types.ts b/apps/app/src/shared/types.ts similarity index 100% rename from apps/marcolongo.cloud/src/shared/types.ts rename to apps/app/src/shared/types.ts diff --git a/apps/marcolongo.cloud/src/styles.scss b/apps/app/src/styles.scss similarity index 100% rename from apps/marcolongo.cloud/src/styles.scss rename to apps/app/src/styles.scss diff --git a/apps/marcolongo.cloud/src/test-setup.ts b/apps/app/src/test-setup.ts similarity index 100% rename from apps/marcolongo.cloud/src/test-setup.ts rename to apps/app/src/test-setup.ts diff --git a/apps/marcolongo.cloud/tailwind.config.ts b/apps/app/tailwind.config.ts similarity index 100% rename from apps/marcolongo.cloud/tailwind.config.ts rename to apps/app/tailwind.config.ts diff --git a/apps/marcolongo.cloud/tsconfig.app.json b/apps/app/tsconfig.app.json similarity index 100% rename from apps/marcolongo.cloud/tsconfig.app.json rename to apps/app/tsconfig.app.json diff --git a/apps/marcolongo.cloud/tsconfig.editor.json b/apps/app/tsconfig.editor.json similarity index 100% rename from apps/marcolongo.cloud/tsconfig.editor.json rename to apps/app/tsconfig.editor.json diff --git a/apps/marcolongo.cloud/tsconfig.json b/apps/app/tsconfig.json similarity index 100% rename from apps/marcolongo.cloud/tsconfig.json rename to apps/app/tsconfig.json diff --git a/apps/marcolongo.cloud/tsconfig.spec.json b/apps/app/tsconfig.spec.json similarity index 100% rename from apps/marcolongo.cloud/tsconfig.spec.json rename to apps/app/tsconfig.spec.json diff --git a/apps/marcolongo.cloud-api-e2e/package.json b/apps/marcolongo.cloud-api-e2e/package.json deleted file mode 100644 index 45fac5a8..00000000 --- a/apps/marcolongo.cloud-api-e2e/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@marcolongo.cloud/marcolongo.cloud-api-e2e", - "version": "0.0.0" -} diff --git a/apps/marcolongo.cloud-api/chart/Chart.yaml b/apps/marcolongo.cloud-api/chart/Chart.yaml deleted file mode 100644 index d91ea945..00000000 --- a/apps/marcolongo.cloud-api/chart/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: marcolongo.cloud-api -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: '0.0.0' diff --git a/apps/marcolongo.cloud-api/chart/templates/service.yaml b/apps/marcolongo.cloud-api/chart/templates/service.yaml deleted file mode 100644 index 8451ce1c..00000000 --- a/apps/marcolongo.cloud-api/chart/templates/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: { { include "chart.fullname" . } } - labels: { { - include "chart.labels" . | nindent 4 } } -spec: - type: { { .Values.service.type } } - ports: - - port: { { .Values.service.port } } - targetPort: http - protocol: TCP - name: http - selector: { { - include "chart.selectorLabels" . | nindent 4 } } diff --git a/apps/marcolongo.cloud-e2e/package.json b/apps/marcolongo.cloud-e2e/package.json deleted file mode 100644 index 99cf82a5..00000000 --- a/apps/marcolongo.cloud-e2e/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@marcolongo.cloud/marcolongo.cloud-e2e", - "version": "0.0.0" -} diff --git a/apps/marcolongo.cloud/Dockerfile b/apps/marcolongo.cloud/Dockerfile deleted file mode 100644 index 0bbe8485..00000000 --- a/apps/marcolongo.cloud/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM nginx:stable-alpine -COPY dist/apps/marcolongo.cloud/browser/* /usr/share/nginx/html/ -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] diff --git a/apps/marcolongo.cloud/chart/Chart.yaml b/apps/marcolongo.cloud/chart/Chart.yaml deleted file mode 100644 index b1a67784..00000000 --- a/apps/marcolongo.cloud/chart/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: marcolongo.cloud-app -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: '0.0.0' diff --git a/apps/marcolongo.cloud/chart/templates/service.yaml b/apps/marcolongo.cloud/chart/templates/service.yaml deleted file mode 100644 index 8451ce1c..00000000 --- a/apps/marcolongo.cloud/chart/templates/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: { { include "chart.fullname" . } } - labels: { { - include "chart.labels" . | nindent 4 } } -spec: - type: { { .Values.service.type } } - ports: - - port: { { .Values.service.port } } - targetPort: http - protocol: TCP - name: http - selector: { { - include "chart.selectorLabels" . | nindent 4 } } diff --git a/apps/marcolongo.cloud/chart/values.dev.yaml b/apps/marcolongo.cloud/chart/values.dev.yaml deleted file mode 100644 index a09926e5..00000000 --- a/apps/marcolongo.cloud/chart/values.dev.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# Default values for chart. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: ghcr.io/marcolongol/marcolongo.cloud-app - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: 'development' - -imagePullSecrets: [] -nameOverride: '' -fullnameOverride: '' - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Automatically mount a ServiceAccount's API credentials? - automount: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: '' - -podAnnotations: {} -podLabels: {} - -podSecurityContext: - {} - # fsGroup: 2000 - -securityContext: - {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - className: '' - annotations: - {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: - {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -livenessProbe: - httpGet: - path: / - port: http -readinessProbe: - httpGet: - path: / - port: http - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -# Additional volumes on the output Deployment definition. -volumes: [] -# - name: foo -# secret: -# secretName: mysecret -# optional: false - -# Additional volumeMounts on the output Deployment definition. -volumeMounts: [] -# - name: foo -# mountPath: "/etc/foo" -# readOnly: true - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/chart/Chart.lock b/chart/Chart.lock index 449a451a..fb68fb1d 100644 --- a/chart/Chart.lock +++ b/chart/Chart.lock @@ -1,9 +1,6 @@ dependencies: -- name: marcolongo.cloud-app - repository: file://../apps/marcolongo.cloud/chart +- name: app + repository: file://../apps/app/chart version: 0.1.0 -- name: marcolongo.cloud-api - repository: file://../apps/marcolongo.cloud-api/chart - version: 0.1.0 -digest: sha256:04f0cb8f6eece312c747c1f8623865c1b509f1c5e29edbe10bec4b9a98263b12 -generated: "2024-08-08T01:35:17.100219-07:00" +digest: sha256:84569ef7b8c7c71cd6e8ffc4c38b2a1f70745c97776bcbab29caa3e68989308b +generated: "2024-08-13T17:16:11.4404099-07:00" diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 5015895b..7e5f4a17 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,33 +1,11 @@ apiVersion: v2 -name: marcolongo.cloud +name: marcolongo-cloud description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. appVersion: '1.16.0' - dependencies: - - name: marcolongo.cloud-app - version: "0.1.0" - repository: file://../apps/marcolongo.cloud/chart - - - name: marcolongo.cloud-api - version: "0.1.0" - repository: file://../apps/marcolongo.cloud-api/chart + - name: app + condition: app.enabled + repository: file://../apps/app/chart + version: 0.1.0 diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml deleted file mode 100644 index 9fa17678..00000000 --- a/chart/templates/deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "chart.fullname" . }} - labels: - {{- include "chart.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "chart.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "chart.labels" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "chart.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.service.port }} - protocol: TCP - livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} - readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.volumeMounts }} - volumeMounts: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.volumes }} - volumes: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/chart/templates/hpa.yaml b/chart/templates/hpa.yaml deleted file mode 100644 index a91f61bd..00000000 --- a/chart/templates/hpa.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "chart.fullname" . }} - labels: - {{- include "chart.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "chart.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml deleted file mode 100644 index 63c1311c..00000000 --- a/chart/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "chart.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "chart.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/chart/templates/service.yaml b/chart/templates/service.yaml deleted file mode 100644 index 8451ce1c..00000000 --- a/chart/templates/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: { { include "chart.fullname" . } } - labels: { { - include "chart.labels" . | nindent 4 } } -spec: - type: { { .Values.service.type } } - ports: - - port: { { .Values.service.port } } - targetPort: http - protocol: TCP - name: http - selector: { { - include "chart.selectorLabels" . | nindent 4 } } diff --git a/chart/templates/serviceaccount.yaml b/chart/templates/serviceaccount.yaml deleted file mode 100644 index 1df93501..00000000 --- a/chart/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "chart.serviceAccountName" . }} - labels: - {{- include "chart.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automount }} -{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index ca336cbe..51034c7c 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -109,3 +109,12 @@ nodeSelector: {} tolerations: [] affinity: {} + +app: + enabled: true + + api: + enabled: true + + postgresql: + enabled: true diff --git a/jest.preset.js b/jest.preset.js index 5f785e86..5726efc0 100644 --- a/jest.preset.js +++ b/jest.preset.js @@ -2,5 +2,5 @@ const nxPreset = require('@nx/jest/preset').default; module.exports = { ...nxPreset, - coverageReporters: ['lcov', 'text', 'html'], + coverageReporters: ['lcov', 'text', 'html', 'text-summary'], };