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

Deploy to Google Cloud #159

Merged
merged 4 commits into from
Jul 26, 2023
Merged

Deploy to Google Cloud #159

merged 4 commits into from
Jul 26, 2023

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented Jul 25, 2023

What's missing:

  • a bucket for user files
  • OAuth client set up
  • email service

* This script injects Google Cloud metadata (when available) into the environment.
* Specifically, it injects the NEXTAUTH_URL and BASE_HTTP_ENDPOINT environment variables.
* Run with `npm run with-gcp-metadata <command> <args>`.
*/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

very frustrating: the generated cloud run URL isn't known until after the deploy, and terraform blocks can't reference themselves

I think this is the cleanest solution, didn't see anything simpler online

Copy link
Contributor

Choose a reason for hiding this comment

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

NEXAUTH_URL will be our domain, e.g. [staging.]compassiep.com

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, however ideally we can deploy without a domain/with the generated one with necessary
it'd be nice to be able to deploy to a new project or a personal account for testing

@codetheweb codetheweb marked this pull request as ready for review July 25, 2023 04:56
@codetheweb codetheweb requested a review from amantri July 25, 2023 04:56
* This script injects Google Cloud metadata (when available) into the environment.
* Specifically, it injects the NEXTAUTH_URL and BASE_HTTP_ENDPOINT environment variables.
* Run with `npm run with-gcp-metadata <command> <args>`.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

NEXAUTH_URL will be our domain, e.g. [staging.]compassiep.com

name = "DATABASE_URL"
value_source {
secret_key_ref {
secret = google_secret_manager_secret.database_url.secret_id
Copy link
Contributor

Choose a reason for hiding this comment

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

very cool!

terraform/gcs/main.tf Show resolved Hide resolved
terraform/gcs/cloud_sql.tf Outdated Show resolved Hide resolved
@codetheweb codetheweb merged commit 86378dc into main Jul 26, 2023
3 checks passed
@codetheweb codetheweb deleted the feat-google-cloud branch July 26, 2023 03:25
jonahchoi pushed a commit that referenced this pull request Jul 28, 2023
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.

2 participants