Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env var mapboxApiAccessToken #674

Merged
merged 12 commits into from
Apr 28, 2020
Merged

Conversation

diw2
Copy link
Contributor

@diw2 diw2 commented Apr 20, 2020

add MapboxAccessToken env var to portal from cloud-automation

@diw2 diw2 requested review from paulineribeyre and mfshao April 21, 2020 20:17
Copy link
Collaborator

@mfshao mfshao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@paulineribeyre paulineribeyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, my only complaint is that for local development we need to set the environment variable, could we add a warning at startup when it's not set? "MAPBOX_API_TOKEN environment variable not set, will be unable to load maps"

@@ -160,6 +160,7 @@ if [[ "$NODE_ENV" == "dev" || "$NODE_ENV" == "auto" ]]; then
echo ./node_modules/.bin/webpack-dev-server
./node_modules/.bin/webpack-dev-server
else
export NODE_OPTIONS='--max-old-space-size=4096'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

Copy link
Collaborator

@mfshao mfshao Apr 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to allow node to allocate more mem (default is 512MB i think).

we have this in the Dockerfile but don't know why not here. And portal is so fat that it need this to spin up...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, is this related to covid19? if not, can we make a separate PR to merge this to master? this PR will only be merged to branch feat/covid19dashboard for now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah portal on this branch won't start up if don't have this 😞

i guess by adding more into portal eventually the master branch will gonna need this one day

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just adding 1 environment variable triggered this?? 😱

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it sounds unrealistic but 😕

@paulineribeyre
Copy link
Contributor

paulineribeyre commented Apr 22, 2020

could we add a warning at startup when MAPBOX_API_TOKEN is not set?

sorry, changed my mind 🤦‍♀️it shouldn't be at startup because commons that don't use maps should not get a warning all the time haha. We can put the warning in the covid19dashboard/index.jsx file instead

@paulineribeyre paulineribeyre merged commit b3ff98f into feat/covid19dashboard Apr 28, 2020
@paulineribeyre paulineribeyre deleted the chore/mapbox_token branch April 28, 2020 20:07
@paulineribeyre paulineribeyre mentioned this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants