From 270e99eb869014315ffbd11417923c9d8131bade Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 10:56:02 +0000 Subject: [PATCH 01/16] Update docker/Dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index bfa4810c..fe142599 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,7 @@ COPY package.json package-lock.json ./ # Install dependencies RUN npm ci -# Copy the rest of the code (including the environment.ts injected by Gitea Actions) +# Copy the rest of the code COPY . . # Build the Angular app for production From ebff9928162bf9ea7a938e9595402b82da5e2e30 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 11:50:37 +0000 Subject: [PATCH 02/16] Add docker/Dockerfile --- docker/Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..ed8bccc2 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,29 @@ +## ----- Stage 1: Build Angular SSR App ----- +FROM node:22-alpine AS build +WORKDIR /app + +# Copy package files +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm ci + +# Copy the rest of the code +COPY . . + +# Build the Angular app for production +RUN npm run build + +# ----- Stage 2: Serve SSR App ----- +FROM node:22-alpine AS final + +WORKDIR /app + +# Copy the built assets from the build stage. +COPY --from=build /app/preview ./preview + +# Expose the standard Angular SSR port +EXPOSE 4000 + +# Start the Node.js SSR server +CMD ["node", "preview/server/server.mjs"] \ No newline at end of file From 375978eeb722c544a0e1d07fd2c412eec8e24e10 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 11:51:25 +0000 Subject: [PATCH 03/16] Add .gitea/workflows/docker-publish.yaml --- .gitea/workflows/docker-publish.yaml | 94 ++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .gitea/workflows/docker-publish.yaml diff --git a/.gitea/workflows/docker-publish.yaml b/.gitea/workflows/docker-publish.yaml new file mode 100644 index 00000000..1a1d71a0 --- /dev/null +++ b/.gitea/workflows/docker-publish.yaml @@ -0,0 +1,94 @@ +name: Docker Build & Publish UI + +on: + push: + branches: [ prod, dev ] + +env: + REGISTRY: gitea.biz360.me + IMAGE_NAME: ${{ github.repository }} + PROJECT_SECRET_KEY: "MASTERADMINUI" + # Target the base environment file directly + ENV_FILE_PATH: "src/environments/environment.ts" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Determine Environment + id: env_config + run: | + if [[ "${GITHUB_REF##*/}" == "dev" ]]; then + echo "INFISICAL_ENV=dev" >> $GITHUB_OUTPUT + elif [[ "${GITHUB_REF##*/}" == "prod" ]]; then + echo "INFISICAL_ENV=prod" >> $GITHUB_OUTPUT + fi + + - name: Fetch secrets from Infisical + uses: Infisical/secrets-action@v1.0.9 + with: + client-id: ${{ secrets.INFISICAL_CLIENT_ID }} + client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }} + env-slug: ${{ steps.env_config.outputs.INFISICAL_ENV }} + project-slug: "syscom-xpq-0" + domain: "https://infisical.biz360.me/" + # export-type: "file" + # file-output-path: "/infisical.env" + + # - name: Brute-force overwrite environment.ts + # run: | + # source infisical.env + + # # Forcefully overwrite the file the developers are importing + # echo "${!PROJECT_SECRET_KEY}" > "$ENV_FILE_PATH" + + # # Clean up + # rm -f infisical.env + + - name: Brute-force overwrite environment.ts + run: | + # Because the secret is now a native environment variable, we can write it directly. + # The double quotes around the indirect expansion preserve all newlines and internal single quotes! + echo "${!PROJECT_SECRET_KEY}" > "$ENV_FILE_PATH" + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=raw,value=dev-{{date 'YYYYMMDDTHHmm'}},enable=${{ github.ref == 'refs/heads/dev' }} + type=raw,value=prod-{{date 'YYYYMMDDTHHmm'}},enable=${{ github.ref == 'refs/heads/prod' }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./docker/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + # Optional: Revert the file so the runner stays completely clean + - name: Clean up modified workspace + if: always() + run: git checkout -- "$ENV_FILE_PATH" \ No newline at end of file From f3be09ad25eb95a1fa2c37c149d294dd5bd6a50c Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 11:55:42 +0000 Subject: [PATCH 04/16] Update src/app/shared/services/firebase.service.ts --- src/app/shared/services/firebase.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/services/firebase.service.ts b/src/app/shared/services/firebase.service.ts index f7367cc5..40d059fb 100644 --- a/src/app/shared/services/firebase.service.ts +++ b/src/app/shared/services/firebase.service.ts @@ -10,7 +10,7 @@ import { environment } from '../../../environments/environment'; }) export class FirebaseService { constructor() { - AngularFireModule.initializeApp(environment.firebase); + // AngularFireModule.initializeApp(environment.firebase); } getFirestore() { From 044c98b8c05839683a75d7822ecf5bac70b41272 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 11:56:14 +0000 Subject: [PATCH 05/16] Update src/app/core/services/common/firebase.service.ts --- src/app/core/services/common/firebase.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/services/common/firebase.service.ts b/src/app/core/services/common/firebase.service.ts index 74b07156..8254331d 100644 --- a/src/app/core/services/common/firebase.service.ts +++ b/src/app/core/services/common/firebase.service.ts @@ -10,7 +10,7 @@ import { environment } from '../../../../environments/environment'; }) export class FirebaseService { constructor() { - AngularFireModule.initializeApp(environment.firebase); + // AngularFireModule.initializeApp(environment.firebase); } getFirestore() { From 624b741b9a53f990179b5b8737f18dac09547bbf Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 11:56:50 +0000 Subject: [PATCH 06/16] Update src/app/app.config.ts --- src/app/app.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.config.ts b/src/app/app.config.ts index db2874ef..b26bebc6 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -26,7 +26,7 @@ export const appConfig: ApplicationConfig = { AngularFireModule, provideCharts(withDefaultRegisterables()), importProvidersFrom( - AngularFireModule.initializeApp(environment.firebase), + // AngularFireModule.initializeApp(environment.firebase), ToastrModule.forRoot({ timeOut: 1500, closeButton: true, From 1184c0c7a2aa3378f48a1c867f19650721f19413 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 12:22:44 +0000 Subject: [PATCH 07/16] Update docker/Dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ed8bccc2..fe142599 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -## ----- Stage 1: Build Angular SSR App ----- +# ----- Stage 1: Build Angular SSR App ----- FROM node:22-alpine AS build WORKDIR /app From 0683856d2b2ab87b27aec3173cfc726d2947459b Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 12:45:01 +0000 Subject: [PATCH 08/16] Update docker/Dockerfile --- docker/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index fe142599..f71ff917 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,10 +20,8 @@ FROM node:22-alpine AS final WORKDIR /app # Copy the built assets from the build stage. -COPY --from=build /app/preview ./preview +COPY --from=build /app/dist /app/dist -# Expose the standard Angular SSR port EXPOSE 4000 -# Start the Node.js SSR server -CMD ["node", "preview/server/server.mjs"] \ No newline at end of file +CMD ["node", "/app/dist/Ynex-Tailwind/server/main.js"] \ No newline at end of file From 970fe414e0870961f32d9b1e53a43d2e1aaf8556 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 12:48:11 +0000 Subject: [PATCH 09/16] Update docker/Dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f71ff917..5f7ee4fa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -20,7 +20,7 @@ FROM node:22-alpine AS final WORKDIR /app # Copy the built assets from the build stage. -COPY --from=build /app/dist /app/dist +COPY --from=build /app/dist ./dist EXPOSE 4000 From 62aaddeae0e7071c1a11d35229392d338cdfb7ef Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 12:52:30 +0000 Subject: [PATCH 10/16] Add Dockerfile --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5f7ee4fa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# ----- Stage 1: Build Angular SSR App ----- +FROM node:22-alpine AS build +WORKDIR /app + +# Copy package files +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm ci + +# Copy the rest of the code +COPY . . + +# Build the Angular app for production +RUN npm run build + +# ----- Stage 2: Serve SSR App ----- +FROM node:22-alpine AS final + +WORKDIR /app + +# Copy the built assets from the build stage. +COPY --from=build /app/dist ./dist + +EXPOSE 4000 + +CMD ["node", "/app/dist/Ynex-Tailwind/server/main.js"] \ No newline at end of file From 043e57769246513b731eb1dc36645f5e0cedffd6 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 12:52:46 +0000 Subject: [PATCH 11/16] Update .gitea/workflows/docker-publish.yaml --- .gitea/workflows/docker-publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/docker-publish.yaml b/.gitea/workflows/docker-publish.yaml index 1a1d71a0..dc011f6e 100644 --- a/.gitea/workflows/docker-publish.yaml +++ b/.gitea/workflows/docker-publish.yaml @@ -81,7 +81,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: ./docker/Dockerfile + file: Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 2d068bda034cddc3b28bfa69c5bad6db975da2cc Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 12:57:29 +0000 Subject: [PATCH 12/16] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5f7ee4fa..6c876c59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ FROM node:22-alpine AS final WORKDIR /app # Copy the built assets from the build stage. -COPY --from=build /app/dist ./dist +COPY --from=build /app/preview ./dist EXPOSE 4000 From b3da7f8e1ca2f5e66794f7297f26c89e6b4f72bb Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 24 Jul 2026 14:00:29 +0000 Subject: [PATCH 13/16] Update Dockerfile --- Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c876c59..fd279028 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# ----- Stage 1: Build Angular SSR App ----- +# ----- Stage 1: Build Angular App ----- FROM node:22-alpine AS build WORKDIR /app @@ -14,14 +14,14 @@ COPY . . # Build the Angular app for production RUN npm run build -# ----- Stage 2: Serve SSR App ----- -FROM node:22-alpine AS final +# ----- Stage 2: Serve Angular App with Nginx ----- +FROM nginx:alpine -WORKDIR /app +# Copy the built assets from the build stage into Nginx's default HTML folder +COPY --from=build /app/preview /usr/share/nginx/html -# Copy the built assets from the build stage. -COPY --from=build /app/preview ./dist +# Expose standard HTTP port 80 +EXPOSE 80 -EXPOSE 4000 - -CMD ["node", "/app/dist/Ynex-Tailwind/server/main.js"] \ No newline at end of file +# Start Nginx in the foreground +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file From cfb02bee11bf1562a07acc44d83bc51779fb001f Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 27 Jul 2026 05:54:28 +0000 Subject: [PATCH 14/16] Delete docker/Dockerfile --- docker/Dockerfile | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 5f7ee4fa..00000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -# ----- Stage 1: Build Angular SSR App ----- -FROM node:22-alpine AS build -WORKDIR /app - -# Copy package files -COPY package.json package-lock.json ./ - -# Install dependencies -RUN npm ci - -# Copy the rest of the code -COPY . . - -# Build the Angular app for production -RUN npm run build - -# ----- Stage 2: Serve SSR App ----- -FROM node:22-alpine AS final - -WORKDIR /app - -# Copy the built assets from the build stage. -COPY --from=build /app/dist ./dist - -EXPOSE 4000 - -CMD ["node", "/app/dist/Ynex-Tailwind/server/main.js"] \ No newline at end of file From 1d10fcc8c6de8c58afa3f6794deddd375e920b59 Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 27 Jul 2026 07:56:06 +0000 Subject: [PATCH 15/16] Update .gitea/workflows/docker-publish.yaml --- .gitea/workflows/docker-publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/docker-publish.yaml b/.gitea/workflows/docker-publish.yaml index dc011f6e..40cd0091 100644 --- a/.gitea/workflows/docker-publish.yaml +++ b/.gitea/workflows/docker-publish.yaml @@ -73,7 +73,6 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=branch type=raw,value=dev-{{date 'YYYYMMDDTHHmm'}},enable=${{ github.ref == 'refs/heads/dev' }} type=raw,value=prod-{{date 'YYYYMMDDTHHmm'}},enable=${{ github.ref == 'refs/heads/prod' }} From 9757dbaf46761f13720cd8f43c3fe548453912ef Mon Sep 17 00:00:00 2001 From: Gagan7900 <54118395+Gagan7900@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:18:32 +0530 Subject: [PATCH 16/16] commit merge --- .gitignore | 8 ++++++++ tsconfig.spec.json | 1 + 2 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index 8969bd9d..e8c7cc34 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,11 @@ __screenshots__/ # System files .DS_Store Thumbs.db + + +# Ignore local ESLint config +eslint.config.js + +# Ignore preview folder +preview/ +/.vs diff --git a/tsconfig.spec.json b/tsconfig.spec.json index 6e883a1e..5a34497d 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -4,6 +4,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", + "rootDir": "src", "types": [ "vitest/globals" ]