From 043a8f311b93929137803f108b9b46d394e88aa4 Mon Sep 17 00:00:00 2001 From: Subhrajyoti Date: Tue, 14 Sep 2021 20:28:52 +0530 Subject: [PATCH] Renamed library to bookservice --- Dockerfile | 2 +- {library => bookservice}/app.js | 0 {library => bookservice}/bin/clean.js | 0 {library => bookservice}/bin/migrate.js | 0 {library => bookservice}/bin/www | 0 {library => bookservice}/constants.js | 0 {library => bookservice}/database.js | 0 {library => bookservice}/database.test.js | 0 {library => bookservice}/package-lock.json | 0 {library => bookservice}/package.json | 0 {library => bookservice}/processes.json | 0 {library => bookservice}/public/index.html | 0 {library => bookservice}/public/stylesheets/style.css | 0 {library => bookservice}/routes/books.js | 0 {library => bookservice}/routes/index.js | 0 {library => bookservice}/routes/users.js | 0 {library => bookservice}/tracing.js | 2 +- checkout/constants.js | 2 +- docker-compose.debug.yaml | 4 ++-- docker-compose.yaml | 4 ++-- 20 files changed, 7 insertions(+), 7 deletions(-) rename {library => bookservice}/app.js (100%) rename {library => bookservice}/bin/clean.js (100%) rename {library => bookservice}/bin/migrate.js (100%) rename {library => bookservice}/bin/www (100%) rename {library => bookservice}/constants.js (100%) rename {library => bookservice}/database.js (100%) rename {library => bookservice}/database.test.js (100%) rename {library => bookservice}/package-lock.json (100%) rename {library => bookservice}/package.json (100%) rename {library => bookservice}/processes.json (100%) rename {library => bookservice}/public/index.html (100%) rename {library => bookservice}/public/stylesheets/style.css (100%) rename {library => bookservice}/routes/books.js (100%) rename {library => bookservice}/routes/index.js (100%) rename {library => bookservice}/routes/users.js (100%) rename {library => bookservice}/tracing.js (95%) diff --git a/Dockerfile b/Dockerfile index 04bd2d2..7758cf5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM node:12.13.0-alpine RUN mkdir -p /opt/app WORKDIR /opt/app RUN adduser -S app -COPY library/ . +COPY bookservice/ . RUN npm install RUN chown -R app /opt/app USER app diff --git a/library/app.js b/bookservice/app.js similarity index 100% rename from library/app.js rename to bookservice/app.js diff --git a/library/bin/clean.js b/bookservice/bin/clean.js similarity index 100% rename from library/bin/clean.js rename to bookservice/bin/clean.js diff --git a/library/bin/migrate.js b/bookservice/bin/migrate.js similarity index 100% rename from library/bin/migrate.js rename to bookservice/bin/migrate.js diff --git a/library/bin/www b/bookservice/bin/www similarity index 100% rename from library/bin/www rename to bookservice/bin/www diff --git a/library/constants.js b/bookservice/constants.js similarity index 100% rename from library/constants.js rename to bookservice/constants.js diff --git a/library/database.js b/bookservice/database.js similarity index 100% rename from library/database.js rename to bookservice/database.js diff --git a/library/database.test.js b/bookservice/database.test.js similarity index 100% rename from library/database.test.js rename to bookservice/database.test.js diff --git a/library/package-lock.json b/bookservice/package-lock.json similarity index 100% rename from library/package-lock.json rename to bookservice/package-lock.json diff --git a/library/package.json b/bookservice/package.json similarity index 100% rename from library/package.json rename to bookservice/package.json diff --git a/library/processes.json b/bookservice/processes.json similarity index 100% rename from library/processes.json rename to bookservice/processes.json diff --git a/library/public/index.html b/bookservice/public/index.html similarity index 100% rename from library/public/index.html rename to bookservice/public/index.html diff --git a/library/public/stylesheets/style.css b/bookservice/public/stylesheets/style.css similarity index 100% rename from library/public/stylesheets/style.css rename to bookservice/public/stylesheets/style.css diff --git a/library/routes/books.js b/bookservice/routes/books.js similarity index 100% rename from library/routes/books.js rename to bookservice/routes/books.js diff --git a/library/routes/index.js b/bookservice/routes/index.js similarity index 100% rename from library/routes/index.js rename to bookservice/routes/index.js diff --git a/library/routes/users.js b/bookservice/routes/users.js similarity index 100% rename from library/routes/users.js rename to bookservice/routes/users.js diff --git a/library/tracing.js b/bookservice/tracing.js similarity index 95% rename from library/tracing.js rename to bookservice/tracing.js index 02a0e94..4323e86 100644 --- a/library/tracing.js +++ b/bookservice/tracing.js @@ -16,7 +16,7 @@ const { constants } = require("./constants"); const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: "library-app", + [SemanticResourceAttributes.SERVICE_NAME]: "BookService", }) }); diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ALL); diff --git a/checkout/constants.js b/checkout/constants.js index 9ad1123..5bda03c 100644 --- a/checkout/constants.js +++ b/checkout/constants.js @@ -2,7 +2,7 @@ const constants = { PORT: process.env.PORT || 3001, ZIPKIN_HOSTNAME: process.env.ZIPKIN_HOSTNAME || "zipkin", ZIPKIN_PORT: process.env.ZIPKIN_PORT || 9411, - INVENTORY_HOSTNAME: process.env.INVENTORY_HOSTNAME || "library", + INVENTORY_HOSTNAME: process.env.INVENTORY_HOSTNAME || "bookservice", INVENTORY_PORT: process.env.INVENTORY_PORT || 3000 }; diff --git a/docker-compose.debug.yaml b/docker-compose.debug.yaml index 1f1803a..fec710f 100644 --- a/docker-compose.debug.yaml +++ b/docker-compose.debug.yaml @@ -30,7 +30,7 @@ services: build: context: checkout depends_on: - - library + - bookservice - zipkin command: "node --inspect-brk=0.0.0.0 checkout.js" ports: @@ -39,7 +39,7 @@ services: networks: - app-tier - library: + bookservice: build: context: . environment: diff --git a/docker-compose.yaml b/docker-compose.yaml index 9575eb1..75acabc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -30,14 +30,14 @@ services: build: context: checkout depends_on: - - library + - bookservice - zipkin ports: - '3001:3001' networks: - app-tier - library: + bookservice: build: context: . environment: