feat: checking env variables

pull/1097/head
smit95tpatel 2022-05-04 14:45:23 +05:30
parent 7dc2bf0569
commit db9e6d6040
4 changed files with 5 additions and 7 deletions

View File

@ -49,7 +49,6 @@ jobs:
file: ./Dockerfile.base
build-args: |
GIT_COMMIT_HASH=${{ github.sha }}
GIT_TOKEN=${{ secrets.GIT_TOKEN }}
GITHUB_ACCESS_TOKEN=${{ secrets.CI_BOT_TOKEN }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
@ -63,10 +62,7 @@ jobs:
tags: razorpay/statping:service_${{ github.sha }}
push: true
file: ./Dockerfile
build-args: |
GIT_COMMIT_HASH=${{ github.sha }}
GIT_TOKEN=${{ secrets.GIT_TOKEN }}
GITHUB_ACCESS_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
build-args: GIT_COMMIT_HASH=${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
env:

View File

@ -20,7 +20,8 @@ COPY ./react-frontend/yarn.lock .
COPY ./react-frontend/.npmrc .
RUN yarn install --pure-lockfile --network-timeout 1000000
COPY ./react-frontend/ .
RUN yarn build && yarn cache clean
COPY ./react-frontend/.env.production .
RUN yarn build:production && yarn cache clean
# Statping Golang BACKEND building from source
# Creates "/go/bin/statping" and "/usr/local/bin/sass" for copying

View File

@ -5,6 +5,7 @@
"scripts": {
"start": "react-scripts start",
"build": "rm -rf build && GENERATE_SOURCEMAP=false react-scripts build",
"build:production": "rm -rf build && GENERATE_SOURCEMAP=false REACT_APP_ENV=production react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},

View File

@ -7,7 +7,7 @@ import Navigation from "./Navbar";
import { initLumberjack } from "../utils/trackers";
const App = () => {
console.log(`Application running on ${process.env.NODE_ENV} mode.`);
console.log(`Application running on ${JSON.stringify(process.env)} mode.`);
useEffect(() => {
initLumberjack();
}, [])