Skip to content
Han edited this page Nov 3, 2022 · 1 revision

ReactJS and styled components Netlify deploys Google cloud platform Google analytics GovUK Notify

Deployment checklist

In Netlify we have the ability to set different environmental variables based on the branch name. By default STAGING and DEVELOP are also auto-built along with MASTER (production).

You can add STAGING_ under any of these env variables to make them different in different environments.

ENV VAR Value Description Service
EMAIL_HOST <SCOUT URL> URLs in emails will be built using this GOV.UK Notify / Sendgrid
STAGING_EMAIL_HOST <SCOUT STAGING URL> URLs in emails will be built using this GOV.UK Notify / Sendgrid
NOTIFY_API_KEY API key for GOV.UK Notify
NOTIFY_TEMPLATE_ID Template ID for GOV.UK Notify
FILTERS_DATASOURCE https://<OUTPOST URL>/api/v1 The url for outpost (not the API) used for fetching taxonomies etc from the database on build Outpost
STAGING_FILTERS_DATASOURCE https://<OUTPOST STAGING URL>/api/v1 The url for outpost (not the API) used for fetching taxonomies etc from the database on build Outpost
REACT_APP_API_HOST https://<OUTPOST API SERVICE URL>/api/v1 The url for the API service. Used to display services on scout. Outpost API service
STAGING_REACT_APP_API_HOST https://<OUTPOST API SERVICE STAGING URL>/api/v1 The url for the API service. Used to display services on scout. Outpost API service
REACT_APP_FEEDBACK_URL Url to feedback form If set, scout displays a section in the footer prompting for feedback on scout
REACT_APP_OUTPOST_LOGIN_URL Url to login form URL to the login page for outpost, this could also take you to a CMS page with some blurb to serve as an introduction to the system. If this field is empty there is no prompt to login in the footer of scout.
REACT_APP_OUTPOST_REGISTER_URL Url to register form URL to the register page for outpost, this could also take you to a CMS page with some blurb to serve as an introduction to the system. If this field is empty there is no prompt to register in the footer of scout
REACT_APP_GA_PROPERTY_ID Google analytics
REACT_APP_GOOGLE_CLIENT_KEY See Google maps
REACT_APP_GOOGLE_STATIC_MAPS_API_KEY See Google maps
STAGING_REACT_APP_GOOGLE_STATIC_MAPS_API_KEY See Google maps
REACT_APP_THEME bod, bfis, generic, tvp Short code to tell scout which theme to apply
REACT_APP_SCOUT_URL https://<SCOUT URL> Url for scout
REACT_APP_TARGETS bfis,bod, bod, bfis If you are not using directories feature leave this blank and the API will return all services. If you are using directories this field lets you target different data depending on your install. You can combine multiple as well. Sending bfis,bod tells the api service you want services sent to the bfis, bod or both directories. Sending just bod will show you only services sent to bod
REACT_APP_OUTPOST_URL https://<OUTPOST URL> Used to form feedback url

Scout themes

Scout themes have a number of settings specific to the theme. These are listed below.

Title Value Description
slug bfis, bod Short format for the name of the theme, used to reference the theme name by REACT_APP_THEME
title Name of scout The name of this scout instance.
contactEmail Contact email address
contactPhone Contact phone number
serviceHomepageUrl http://www. Used if service, eg FIS has their own homepage
organisation Council name Name of the organisation, eg Buckinghamshire council or Thames Valley Police VRU
organisationUrl http://www. Organisations URL
tagLine Find activities and organisations near you Tagline for scout
beta true false
headerLogo imported into file logo for scout
cookiesDisabledMessage Please note, some functionality such as interactive maps and location auto complete is currently disabled. Please accept cookies to use these features. If cookies are disabled this is the message shown on the page in places where functionality is degraded
cookieMessage html for the cookie banner Shown in the cookie banner prompt on the page
cookieName x-scout Cookie name
cookieCallback javascript to load after cookies are accepted Include things like google tag manager etc
footerNav html for custom footer navigations
mapSwitchSmall true false
filterOrder See below Which filters do you want and in what order.
usePresetTaxonomies See below Deprecated Friday, 12 August 2022 Sometimes you don’t want all taxonomies loading from Outpost. This option lets you use taxonomies from a pre-generated json file. Loads _taxonomies.json file in the theme folder.
noLocationIsCountywide true false
serviceCard.hideCategories true false
targets Set in ENV VARS See REACT_APP_TARGETS in ‣
outpostLoginUrl Set in ENV VARS
outpostRegisterUrl Set in ENV VARS
feedbackUrl Set in ENV VARS
scoutUrl Set in ENV VARS
[
    {
      order: 1,
      name: "send-needs",
    },
    {
      order: 2,
      name: "ages",
    },
    {
      order: 3,
      name: "accessibilities",
    },
    {
      order: 4,
      name: "only-show",
    },
    {
      order: 5,
      name: "days",
    },
    {
      order: 6,
      name: "suitabilities",
    },
  ]

Preset taxonomies has now been deprecated.

[{
    "id": 3,
    "label": "Things to do",
    "slug": "things-to-do",
    "level": 0,
    "children": []
}, {
    "id": 273,
    "label": "Advice and support",
    "slug": "advice-and-support",
    "level": 0,
    "children": [{
        "id": 274,
        "label": "Health and wellbeing",
        "slug": "health-and-wellbeing",
        "level": 1,
        "children": []
    }, {
        "id": 403,
        "label": "Transport",
        "slug": "transport",
        "level": 1,
        "children": []
    }, {
        "id": 404,
        "label": "For older people",
        "slug": "for-older-people",
        "level": 1,
        "children": []
    }, {
        "id": 405,
        "label": "Faith groups",
        "slug": "faith-groups",
        "level": 1,
        "children": []
    }, {
        "id": 406,
        "label": "Befriending",
        "slug": "befriending",
        "level": 1,
        "children": []
    }, {
        "id": 407,
        "label": "Staying at home due to coronavirus",
        "slug": "staying-at-home-due-to-coronavirus",
        "level": 1,
        "children": []
    }, {
        "id": 408,
        "label": "Foodbanks",
        "slug": "foodbanks",
        "level": 1,
        "children": []
    }]
}, {
    "id": 287,
    "label": "Education and learning",
    "slug": "education-and-learning",
    "level": 0,
    "children": []
}, {
    "id": 402,
    "label": "Staying active",
    "slug": "staying-active",
    "level": 0,
    "children": []
}, {
    "id": 409,
    "label": "Environment",
    "slug": "environment",
    "level": 0,
    "children": []
}]

Google maps

What you will need to create

Don’t forget to make the staging and dev ones - never use the wrong ones in the wrong environment.

  • scout_maps_prod, scout_maps_dev, scout_maps_staging
    • AKA
    • APIs:
      • Maps JavaScript API
      • Maps Static API
      • Places API
    • Restrictions:
      • Scout url
  • scout_maps_static_prod, scout_maps_static_dev, scout_maps_static_staging
    • APIs:
      • Maps Static API
    • Restrictions
      • Scout url
Clone this wiki locally