diff --git a/src/currencyservice/Dockerfile b/src/currencyservice/Dockerfile index b7b0c0970cb..9a1135fd768 100644 --- a/src/currencyservice/Dockerfile +++ b/src/currencyservice/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM node:8-alpine as base +FROM node:12-alpine as base FROM base as builder @@ -29,6 +29,8 @@ COPY package*.json ./ RUN npm install --only=production +RUN npm install epsagon-frameworks + FROM base RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ @@ -37,10 +39,15 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ WORKDIR /usr/src/app +ENV NODE_OPTIONS --require=epsagon-frameworks +ENV EPSAGON_TOKEN a353f9bd-be48-4898-b16a-0ee277d5765e +ENV EPSAGON_APP_NAME Epsagon +ENV EPSAGON_DEBUG true + COPY --from=builder /usr/src/app/node_modules ./node_modules COPY . . EXPOSE 7000 -ENTRYPOINT [ "node", "server.js" ] +ENTRYPOINT [ "node", "server.js" ] \ No newline at end of file diff --git a/src/paymentservice/Dockerfile b/src/paymentservice/Dockerfile index 44a1fee0fea..2f17ab9a6f2 100644 --- a/src/paymentservice/Dockerfile +++ b/src/paymentservice/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM node:8-alpine as base +FROM node:12-alpine as base FROM base as builder @@ -29,6 +29,8 @@ COPY package*.json ./ RUN npm install --only=production +RUN npm install epsagon-frameworks + FROM base RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ @@ -37,6 +39,12 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ WORKDIR /usr/src/app +ENV NODE_OPTIONS --require=epsagon-frameworks +ENV EPSAGON_TOKEN a353f9bd-be48-4898-b16a-0ee277d5765e +ENV EPSAGON_APP_NAME paymentservice +ENV EPSAGON_DEBUG true +ENV EPSAGON_SEND_TIMEOUT_SEC 2.0 + COPY --from=builder /usr/src/app/node_modules ./node_modules COPY . . diff --git a/src/paymentservice/index.js b/src/paymentservice/index.js index 661bc8278c8..99b786c2aab 100644 --- a/src/paymentservice/index.js +++ b/src/paymentservice/index.js @@ -38,4 +38,4 @@ const PROTO_PATH = path.join(__dirname, '/proto/'); const server = new HipsterShopServer(PROTO_PATH, PORT); -server.listen(); +server.listen(); \ No newline at end of file