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

Neatening up GCP credentials setup #266

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

apricot13
Copy link
Member

@apricot13 apricot13 commented Oct 28, 2022

This PR makes the setup for GCP buckets much neater and less likely to cause errors on your local environment if you don't have everything setup yet. (I was getting fed up of that header error.) Should help fix the error on #256

one step closer to secrets management!

I have tested locally and on tpx demo staging https://tpx-outpost-demo-staging.herokuapp.com/

Deployment notes

To use GCP locally on development

  • download the keyfile.json for the bucket you want to use (1password) and drop it into your /config/secrets/ folder (rename it gcp.json)
  • Set your local vars - you wont need any other GCP_* ones anymore
GCP_PROJECT=bucket_name
GCP_BUCKET=project_name
  • when running locally it will use this bucket for storage

To use GCP on heroku

  • As above download the keyfile.json for the bucket you want to use (1password)
  • update the lines below to match your json file - along with the bucket and project names
heroku config:set -a heroku-app-name \
GCP_BUCKET=bucket_name \
GCP_PROJECT=project_name \ 
GCP_APPLICATION_CREDENTIALS="$(< config/secrets/correct-keyfile-for-env.json)"

@futuregov futuregov had a problem deploying to tpx-outpost-demo-staging October 31, 2022 15:29 Failure
@futuregov futuregov temporarily deployed to tpx-outpost-demo-staging October 31, 2022 15:31 Inactive
@futuregov futuregov temporarily deployed to tpx-outpost-demo-staging October 31, 2022 15:43 Inactive
@apricot13 apricot13 marked this pull request as ready for review October 31, 2022 15:58
@apricot13 apricot13 requested a review from em-cd October 31, 2022 15:58
@apricot13 apricot13 marked this pull request as draft August 22, 2023 15:02
@apricot13 apricot13 mentioned this pull request Nov 29, 2023
2 tasks
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.

None yet

2 participants