Skip to content

Commit

Permalink
Merge pull request #12215 from bbc/WSTEAMA-1458-setup-static-assets-f…
Browse files Browse the repository at this point in the history
…or-2nd-preview-environment

WSTEAMA-1458 - Setup static assets for 2nd preview environment
  • Loading branch information
louisearchibald authored Dec 10, 2024
2 parents 033a7c0 + 5f96643 commit ae0ab66
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
File renamed without changes.
32 changes: 32 additions & 0 deletions envConfig/preview2.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## NB only variables prefixed with SIMORGH_ are available on both the server and client
SIMORGH_BASE_URL=https://www.test.bbc.com
SIMORGH_PUBLIC_STATIC_ASSETS_ORIGIN=https://static.test.files.bbci.co.uk
SIMORGH_PUBLIC_STATIC_ASSETS_PATH=/ws/simorgh2-preview-assets/public/
SIMORGH_ATI_BASE_URL=https://logws1363.ati-host.net?
SIMORGH_CONFIG_URL=https://config.test.api.bbci.co.uk/
SIMORGH_INCLUDES_BASE_URL=https://www.test.bbc.com/ws/includes
SIMORGH_INCLUDES_BASE_AMP_URL=https://news.test.files.bbci.co.uk
SIMORGH_ICHEF_BASE_URL=https://ichef.test.bbci.co.uk
LOG_DIR='/var/log/simorgh'
LOG_LEVEL='debug'
LOG_TO_CONSOLE=false
SIMORGH_APP_ENV=test
SIMORGH_CONFIG_CACHE_ITEMS=400
SIMORGH_CONFIG_CACHE_MAX_AGE_SECONDS=300
SIMORGH_CONFIG_TIMEOUT_SECONDS=1
SERVER_KEEP_ALIVE_TIMEOUT=61000
SERVER_HEADERS_TIMEOUT=65000
SIMORGH_MOST_READ_CDN_URL=https://web-cdn.test.api.bbci.co.uk

## CW Custom Metrics Configuration
AWS_EMF_SERVICE_NAME=Simorgh
AWS_EMF_LOG_GROUP_NAME=SimorghServer
AWS_EMF_ENVIRONMENT=EC2

## WebVitals Reporting
SIMORGH_WEBVITALS_REPORTING_ENDPOINT=https://ws.bbc-reporting-api.app/report-endpoint
SIMORGH_WEBVITALS_DEFAULT_SAMPLING_RATE=100

SIMORGH_CSP_REPORTING_ENDPOINT=https://ws.bbc-reporting-api.app/report-endpoint

SIMORGH_OPTIMIZELY_SDK_KEY=LptPKDnHyAFu9V12s5xCz
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"build:profile": "rm -rf build && cp envConfig/local.env .env && IS_PROD_PROFILE=true NODE_ENV=production webpack",
"build:live": "cp envConfig/live.env .env && NODE_ENV=production webpack",
"build:live:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/live.env > .env && NODE_ENV=production webpack",
"build:preview": "cp envConfig/preview.env .env && NODE_ENV=production webpack",
"build:preview": "cp envConfig/preview1.env .env && NODE_ENV=production webpack",
"build:preview1": "cp envConfig/preview1.env .env && NODE_ENV=production webpack",
"build:preview2": "cp envConfig/preview2.env .env && NODE_ENV=production webpack",
"build:storybook": "yarn build && node .storybook/buildFontPreloads && storybook build -c .storybook -o storybook_dist",
"build:test": "cp envConfig/test.env .env && NODE_ENV=production webpack",
"build:test:debug": "rm -rf build && awk '{sub(/LOG_DIR=.+/,\"LOG_DIR='log'\")}1' envConfig/test.env > .env && NODE_ENV=production webpack",
Expand Down
4 changes: 3 additions & 1 deletion ws-nextjs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"setupDevEnv": "cp ../envConfig/local.env .env && mkdir -p public && cp -r ../public/. public",
"moveStaticAssets": "mkdir -p build/standalone/ws-nextjs-app/public/_next/static && cp -r build/static/. build/standalone/ws-nextjs-app/public/_next/static",
"build:local": "yarn setupDevEnv && NODE_ENV=production && next build && yarn moveStaticAssets",
"build:preview": "cp ../envConfig/preview.env .env && NODE_ENV=production && next build",
"build:preview": "cp ../envConfig/preview1.env .env && NODE_ENV=production && next build",
"build:preview1": "cp ../envConfig/preview1.env .env && NODE_ENV=production && next build",
"build:preview2": "cp ../envConfig/preview2.env .env && NODE_ENV=production && next build",
"build:test": "cp ../envConfig/test.env .env && NODE_ENV=production && next build",
"build:live": "cp ../envConfig/live.env .env && NODE_ENV=production && next build",
"build": "yarn build:local",
Expand Down

0 comments on commit ae0ab66

Please sign in to comment.