feat(1072): prod configuration (#378)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 5 years ago committed by GitHub
parent 4607f05464
commit 93b791612a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Makefile
  2. 1
      src/config/env.tsx
  3. 4
      src/config/routes.tsx

@ -6,11 +6,15 @@ develop:
build:
rm -rf build
npm run build
REACT_APP_PRODUCTION=false npm run build
production-build:
rm -rf build
REACT_APP_PRODUCTION=true npm run build
.PHONY: build
stage: build
stage: production-build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/wwwroot/
a-stage: build

@ -0,0 +1 @@
export const isProduction = process.env.REACT_APP_PRODUCTION === 'true'

@ -1,2 +1,4 @@
export const API_ROOT = 'https://api.instat.tv'
import { isProduction } from './env'
export const API_ROOT = isProduction ? 'https://api.instat.tv' : 'https://api-staging.instat.tv'
export const DATA_URL = `${API_ROOT}/data`

Loading…
Cancel
Save