Web App for remembering names from face images.
Run the following to lisen to local webhook events: stripe listen --forward-to localhost:3000/api/stripe/webhook
- ....
- Make a webhook endpoint in stripe and add the signing secret to the .env file (one for test one for prod)
Run the cloud sql proxy locally to connect to the DB in GCP.
- generate the password file for the service account with "terraform apply"
- follow this guide https://cloud.google.com/sql/docs/postgres/connect-auth-proxy
- ./cloud-sql-proxy --port 5432 name-remember-23:us-central1:name-remember-db
- Connect with to Database on localhost:5432 using the name in the main.tf and the password in file.
- Apply migrations if needed. For example: "psql "postgres://postgres:${password}@localhost:5432/userdata" -f migrations/001_init.sql" or "psql "postgres://test_postgres:${password}@localhost:5432/testdata" -f migrations/001_init.sql"
- Run terraform apply (errors on cloud run is expected due to image not being built yet)
- Update the github action workload_identity_provider with the correct pool_id
- Trigger the github actions to build image
- Delete the cloud run service created by github actions
- Run terraform apply to create final resources
- Apply database migrations
- Set deletion_protection to false on resource "google_sql_database_instance" "default"
- Run terraform destroy