Skip to content

Commit ed05396

Browse files
[Release] Heap.io integration (#35)
Integration heap.io
1 parent 0c1c094 commit ed05396

File tree

6 files changed

+15
-0
lines changed

6 files changed

+15
-0
lines changed

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ UPDATE_CACHE=""
66
docker build -f docker/Dockerfile -t $APP_NAME:latest \
77
--build-arg APPMODE=$APPMODE \
88
--build-arg APPENV=$APPENV \
9+
--build-arg HEAP_ANALYTICS_KEY=$HEAP_ANALYTICS_KEY \
910
--build-arg RECRUIT_API=$RECRUIT_API \
1011
--build-arg AUTH_SECRET=$AUTH_SECRET \
1112
--build-arg VALID_ISSUERS=$VALID_ISSUERS \

config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ module.exports = {
5151
"txt",
5252
],
5353
MAX_ALLOWED_FILE_SIZE_MB: process.env.MAX_ALLOWED_FILE_SIZE_MB || 10,
54+
HEAP_ANALYTICS_KEY: process.env.HEAP_ANALYTICS_KEY || "428520820",
5455
};

docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM node:10.22.1
33

44
ARG APPMODE
55
ARG APPENV
6+
ARG HEAP_ANALYTICS_KEY
67
ARG RECRUIT_API
78
ARG AUTH_SECRET
89
ARG VALID_ISSUERS
@@ -16,6 +17,7 @@ ARG M2M_AUDIT_HANDLE
1617

1718
ENV APPMODE=$APPMODE
1819
ENV APPENV=$APPENV
20+
ENV HEAP_ANALYTICS_KEY=$HEAP_ANALYTICS_KEY
1921
ENV RECRUIT_API=$RECRUIT_API
2022
ENV AUTH_SECRET=$AUTH_SECRET
2123
ENV VALID_ISSUERS=$VALID_ISSUERS
@@ -30,6 +32,7 @@ ENV M2M_AUDIT_HANDLE=$M2M_AUDIT_HANDLE
3032
RUN echo "Env Set :: "
3133
RUN echo $APPMODE
3234
RUN echo $APPENV
35+
RUN echo $HEAP_ANALYTICS_KEY
3336

3437
# Copy the current directory into the Docker image
3538
COPY . /micro-frontends-gigs-app

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"react-responsive-modal": "^6.1.0",
9191
"react-select": "^1.3.0",
9292
"react-use": "^15.3.4",
93+
"reactjs-heap": "^1.0.3",
9394
"redux": "^4.0.5",
9495
"redux-actions": "^2.6.5",
9596
"redux-logger": "^3.0.6",

src/root.component.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
import React from "react";
33
import { createHistory, LocationProvider } from "@reach/router";
44
import { Provider } from "react-redux";
5+
import ReactHeap from "reactjs-heap";
56
import store from "./store";
67
import App from "./App";
78

89
// History for location provider
910
const history = createHistory(window);
11+
if (process.env.HEAP_ANALYTICS_KEY) {
12+
ReactHeap.initialize(process.env.HEAP_ANALYTICS_KEY);
13+
}
1014

1115
export default function Root({ view = "gigs" }) {
1216
return (

0 commit comments

Comments
 (0)