From 48c261dd7345d1347be10a0be5be8ea60eaebe95 Mon Sep 17 00:00:00 2001 From: Srikanth L Date: Fri, 12 Jan 2024 22:02:02 +0530 Subject: [PATCH] Ft : Logging and Country of Query (#70) * Patch reviews and CI/CD Updates (#41) * Trim datee and remove url * Serve openapi.json * Update Actions * Cashless Consumer updated GooglePlayAPI.postman_collection * Maintenance fixes (#42) * Update README.md * Patch reviews and CI/CD Updates (#41) * Trim date and remove url * Serve openapi.json * Update Actions * Cashless Consumer updated GooglePlayAPI.postman_collection * Sync versions * Update docker base image to node 18 * Add logger using morgan (#50) * Bump eslint from 8.49.0 to 8.50.0 --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Add logging using morgan --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add country as global opt (#56) * Update README.md * Patch reviews and CI/CD Updates (#41) * Trim datee and remove url * Serve openapi.json * Update Actions * Cashless Consumer updated GooglePlayAPI.postman_collection * Maintenance fixes (#42) * Update README.md * Patch reviews and CI/CD Updates (#41) * Trim date and remove url * Serve openapi.json * Update Actions * Cashless Consumer updated GooglePlayAPI.postman_collection * Sync versions * Update docker base image to node 18 * Bump eslint from 8.49.0 to 8.50.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.49.0 to 8.50.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.50.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Add country global option * Add Fly env variables --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add page logging (#65) * Add page logging * Update logging * Update Configs (#69) * Update Fly Concurrency config * Update actions * Update logging in prod --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy.yml | 10 +++++----- .github/workflows/newman.yml | 7 ++++++- .github/workflows/npm-publish-github-packages.yml | 12 ++++++------ .github/workflows/npm-publish.yml | 6 +++--- .gitpod.yml | 6 +++++- fly.production.toml | 10 ++++++++++ fly.staging.toml | 10 ++++++++++ 7 files changed, 45 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2229e1b..f6a5c86 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache Node.js dependencies uses: actions/cache@v3 @@ -25,7 +25,7 @@ jobs: ${{ runner.os }}-npm- - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 @@ -54,10 +54,10 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Log into GitHub Container Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin @@ -85,7 +85,7 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get FlyCtl uses: superfly/flyctl-actions/setup-flyctl@master diff --git a/.github/workflows/newman.yml b/.github/workflows/newman.yml index 9ede59b..8468e52 100644 --- a/.github/workflows/newman.yml +++ b/.github/workflows/newman.yml @@ -12,8 +12,13 @@ jobs: newman: runs-on: ubuntu-latest steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Check out repository code and Install - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: npm install - run: npm run generateoas - run: npm start & npx wait-on http://localhost:3000 diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index cc22a24..89ed117 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -12,10 +12,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - run: npm ci publish-gpr: @@ -25,10 +25,10 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 registry-url: https://npm.pkg.github.com/ - run: npm ci - run: npm publish diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 258b08c..1dae95d 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -10,12 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 registry-url: https://npm.pkg.github.com/ - name: Install dependencies diff --git a/.gitpod.yml b/.gitpod.yml index daacc2b..4a42802 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -6,7 +6,11 @@ tasks: - name: Setup and Install - before: npm install + before: | + nvm install 18 + nvm use 18 + npm install + source .env.sample init: npm run generateoas command: npm run start diff --git a/fly.production.toml b/fly.production.toml index bf15928..ec1e24d 100644 --- a/fly.production.toml +++ b/fly.production.toml @@ -20,6 +20,16 @@ primary_region = "sin" auto_start_machines = true min_machines_running = 0 processes = ["app"] + [http_service.concurrency] + type = "requests" + soft_limit = 200 + hard_limit = 250 + +[[services.ports]] + handlers = ["http"] + port = 80 + force_https = true # optional [env] COUNTRY_OF_QUERY = "IN" + LOGGING = true diff --git a/fly.staging.toml b/fly.staging.toml index 0a5de03..d11f993 100644 --- a/fly.staging.toml +++ b/fly.staging.toml @@ -20,6 +20,16 @@ primary_region = "sin" auto_start_machines = true min_machines_running = 0 processes = ["app"] + [http_service.concurrency] + type = "requests" + soft_limit = 200 + hard_limit = 250 + + [[services.ports]] + handlers = ["http"] + port = 80 + force_https = true # optional + [env] COUNTRY_OF_QUERY = "IN"