From f916938ec5559946a1c581d0bc47df41636826f4 Mon Sep 17 00:00:00 2001 From: Soubhik Kumar Gon Date: Wed, 17 Jul 2024 16:17:18 +0530 Subject: [PATCH 1/2] feat: adds versioning --- src/processors/insertIntoDatabase.ts | 2 +- src/services/recv-data/recv-data.service.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/processors/insertIntoDatabase.ts b/src/processors/insertIntoDatabase.ts index c5251b7..2c695a0 100644 --- a/src/processors/insertIntoDatabase.ts +++ b/src/processors/insertIntoDatabase.ts @@ -32,7 +32,7 @@ const insertIntoDatabase = async (payload: EachMessagePayload) => { }; fs.writeFileSync('met.json', JSON.stringify(ids)); - await app.service('recv-data')._create(ids); + await app.service('v1/recv-data')._create(ids); } catch (error: any) { console.error('Error inserting into database:', error.message, error.stack); throw new Error(error); diff --git a/src/services/recv-data/recv-data.service.ts b/src/services/recv-data/recv-data.service.ts index afb0b2f..35ba2f5 100644 --- a/src/services/recv-data/recv-data.service.ts +++ b/src/services/recv-data/recv-data.service.ts @@ -8,7 +8,7 @@ import hooks from './recv-data.hooks'; // Add this service to the service type index declare module '../../declarations' { interface ServiceTypes { - 'recv-data': RecvData & ServiceAddons; + 'v1/recv-data': RecvData & ServiceAddons; } } @@ -20,10 +20,10 @@ export default function (app: Application): void { }; // Initialize our service with any options it requires - app.use('/recv-data', new RecvData(options, app)); + app.use('/v1/recv-data', new RecvData(options, app)); // Get our initialized service so that we can register hooks - const service = app.service('recv-data'); + const service = app.service('v1/recv-data'); service.hooks(hooks); } From 6efab35ba46d887eb0a44af3d0dd2a2ff742ebb4 Mon Sep 17 00:00:00 2001 From: Soubhik Kumar Gon Date: Wed, 17 Jul 2024 16:19:34 +0530 Subject: [PATCH 2/2] chore(ci): fixes context of docker buildkit --- .github/workflows/ghcr-deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ghcr-deploy.yml b/.github/workflows/ghcr-deploy.yml index efe6541..c2fd992 100644 --- a/.github/workflows/ghcr-deploy.yml +++ b/.github/workflows/ghcr-deploy.yml @@ -42,7 +42,8 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v3 with: - context: . + context: ./docker + dockerfile: Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}