mirror of https://github.com/statping/statping
feat: checking env variables
parent
7dc2bf0569
commit
db9e6d6040
|
@ -49,7 +49,6 @@ jobs:
|
||||||
file: ./Dockerfile.base
|
file: ./Dockerfile.base
|
||||||
build-args: |
|
build-args: |
|
||||||
GIT_COMMIT_HASH=${{ github.sha }}
|
GIT_COMMIT_HASH=${{ github.sha }}
|
||||||
GIT_TOKEN=${{ secrets.GIT_TOKEN }}
|
|
||||||
GITHUB_ACCESS_TOKEN=${{ secrets.CI_BOT_TOKEN }}
|
GITHUB_ACCESS_TOKEN=${{ secrets.CI_BOT_TOKEN }}
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
@ -63,10 +62,7 @@ jobs:
|
||||||
tags: razorpay/statping:service_${{ github.sha }}
|
tags: razorpay/statping:service_${{ github.sha }}
|
||||||
push: true
|
push: true
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
build-args: |
|
build-args: GIT_COMMIT_HASH=${{ github.sha }}
|
||||||
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-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -20,7 +20,8 @@ COPY ./react-frontend/yarn.lock .
|
||||||
COPY ./react-frontend/.npmrc .
|
COPY ./react-frontend/.npmrc .
|
||||||
RUN yarn install --pure-lockfile --network-timeout 1000000
|
RUN yarn install --pure-lockfile --network-timeout 1000000
|
||||||
COPY ./react-frontend/ .
|
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
|
# Statping Golang BACKEND building from source
|
||||||
# Creates "/go/bin/statping" and "/usr/local/bin/sass" for copying
|
# Creates "/go/bin/statping" and "/usr/local/bin/sass" for copying
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"build": "rm -rf build && GENERATE_SOURCEMAP=false react-scripts build",
|
"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",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@ import Navigation from "./Navbar";
|
||||||
import { initLumberjack } from "../utils/trackers";
|
import { initLumberjack } from "../utils/trackers";
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
console.log(`Application running on ${process.env.NODE_ENV} mode.`);
|
console.log(`Application running on ${JSON.stringify(process.env)} mode.`);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
initLumberjack();
|
initLumberjack();
|
||||||
}, [])
|
}, [])
|
||||||
|
|
Loading…
Reference in New Issue