From 5d2aa1481af398c6786a87572039d39fb8bb2021 Mon Sep 17 00:00:00 2001 From: "Donovan C. Young" Date: Mon, 9 Feb 2026 20:19:13 -0500 Subject: [PATCH 1/2] Housekeeping: remove dead files, clean up config - Add firebase-debug.log to .gitignore - Remove cloudbuild.yaml (replaced by Kamal deployment) - Remove stale Cloud SQL env vars from deploy.yml (PRODUCTION_DB_NAME, PRODUCTION_DB_USER, CLOUD_SQL_CONNECTION_NAME, GOOGLE_SERVICE_NAME, GOOGLE_INSTANCE_NAME) - Clean up proxy comment in deploy.yml Closes #67 --- .gitignore | 1 + cloudbuild.yaml | 57 ----------------------------------------------- config/deploy.yml | 10 +-------- mise.toml | 2 ++ 4 files changed, 4 insertions(+), 66 deletions(-) delete mode 100644 cloudbuild.yaml create mode 100644 mise.toml diff --git a/.gitignore b/.gitignore index cd4f48d..d047613 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ # Claude Code local settings .claude/ +firebase-debug.log diff --git a/cloudbuild.yaml b/cloudbuild.yaml deleted file mode 100644 index 31a24d9..0000000 --- a/cloudbuild.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# [START cloudrun_rails_cloudbuild] -steps: - - id: Build - name: gcr.io/cloud-builders/docker - secretEnv: ['SECRET_KEY'] - entrypoint: 'bash' - args: ['-c', 'docker build --no-cache --build-arg MASTER_KEY=$$SECRET_KEY --tag $_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA --file Dockerfile .'] - - - id: Push - name: gcr.io/cloud-builders/docker - args: ['push', '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'] - - - id: 'DB Migrations' - name: 'gcr.io/google-appengine/exec-wrapper' - secretEnv: ['SECRET_KEY'] - entrypoint: 'bash' - args: ['-c', '/buildstep/execute.sh -i $_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA -s $PROJECT_ID:$_DEPLOY_REGION:$_SERVICE_NAME -e RAILS_MASTER_KEY=$$SECRET_KEY -- bundle exec rails db:migrate'] - - - id: Deploy - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim' - entrypoint: gcloud - args: - - run - - services - - update - - $_SERVICE_NAME - - '--platform=managed' - - '--image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA' - - >- - --labels=managed-by=gcp-cloud-build-deploy-cloud-run,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID,gcb-trigger-id=$_TRIGGER_ID,$_LABELS - - '--region=$_DEPLOY_REGION' - - '--quiet' - -availableSecrets: - secretManager: - - versionName: projects/$PROJECT_ID/secrets/$_SECRET_NAME/versions/latest - env: SECRET_KEY - -images: - - '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA' - -options: - substitutionOption: ALLOW_LOOSE - -substitutions: - _PLATFORM: managed - _SERVICE_NAME: project-daedalus - _DEPLOY_REGION: us-central1 - _LABELS: gcb-trigger-id=35398d68-d58c-4698-8f89-b81d86f61238 - _TRIGGER_ID: 35398d68-d58c-4698-8f89-b81d86f61238 - _GCR_HOSTNAME: us.gcr.io - -tags: - - gcp-cloud-build-deploy-cloud-run - - gcp-cloud-build-deploy-cloud-run-managed - - project-daedalus -# [END cloudrun_rails_cloudbuild] diff --git a/config/deploy.yml b/config/deploy.yml index c47eb6d..3b6e71a 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -9,10 +9,7 @@ servers: web: - 10.30.11.2 -# Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server. -# Remove this section when using multiple web servers and ensure you terminate SSL at your load balancer. -# -# Note: If using Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption. +# Proxy configuration (SSL terminated externally) proxy: ssl: false app_port: 3000 @@ -36,14 +33,9 @@ builder: # Inject ENV variables into containers (secrets come from .kamal/secrets). env: clear: - PRODUCTION_DB_NAME: project_daedalus_production - PRODUCTION_DB_USER: daedalus - CLOUD_SQL_CONNECTION_NAME: projectdaedalus-fb09f:us-central1:project-daedalus GOOGLE_PROJECT_ID: projectdaedalus-fb09f STORAGE_BUCKET_NAME: project-daedalus-public GOOGLE_REGION: us-central1 - GOOGLE_SERVICE_NAME: project-daedalus - GOOGLE_INSTANCE_NAME: project-daedalus secret: - RAILS_MASTER_KEY diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..fdd320d --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +ruby = "3" From 90dcf441823a6e87ffe4f239bb7c0e88f1fc36fd Mon Sep 17 00:00:00 2001 From: "Donovan C. Young" Date: Mon, 9 Feb 2026 20:47:48 -0500 Subject: [PATCH 2/2] Address CoPilot review feedback - Pin mise.toml Ruby to 3.4.8 to match .ruby-version - Comment out stale Cloud SQL/Cloud Run env vars in .env - Expand SSL termination comment in deploy.yml with details (Cloudflare terminates HTTPS, forwards HTTP to Kamal proxy) --- .env | 10 +++++----- config/deploy.yml | 5 ++++- mise.toml | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 694011c..b8a9baa 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ -PRODUCTION_DB_NAME=project_daedalus_production -PRODUCTION_DB_USER=daedalus -CLOUD_SQL_CONNECTION_NAME=projectdaedalus-fb09f:us-central1:project-daedalus +# PRODUCTION_DB_NAME=project_daedalus_production # Legacy Cloud SQL/Cloud Run — no longer used +# PRODUCTION_DB_USER=daedalus # Legacy Cloud SQL/Cloud Run — no longer used +# CLOUD_SQL_CONNECTION_NAME=projectdaedalus-fb09f:us-central1:project-daedalus # Legacy Cloud SQL/Cloud Run — no longer used GOOGLE_PROJECT_ID=projectdaedalus-fb09f STORAGE_BUCKET_NAME=project-daedalus-public GOOGLE_REGION=us-central1 -GOOGLE_SERVICE_NAME=project-daedalus -GOOGLE_INSTANCE_NAME=project-daedalus +# GOOGLE_SERVICE_NAME=project-daedalus # Legacy Cloud SQL/Cloud Run — no longer used +# GOOGLE_INSTANCE_NAME=project-daedalus # Legacy Cloud SQL/Cloud Run — no longer used diff --git a/config/deploy.yml b/config/deploy.yml index 3b6e71a..e2c76e7 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -9,7 +9,10 @@ servers: web: - 10.30.11.2 -# Proxy configuration (SSL terminated externally) +# Proxy configuration. +# SSL/TLS is terminated by Cloudflare (HTTPS on :443 from clients), +# which forwards plain HTTP to Kamal's proxy on port 80. +# The proxy then forwards to the app on app_port (3000). proxy: ssl: false app_port: 3000 diff --git a/mise.toml b/mise.toml index fdd320d..c6e14d5 100644 --- a/mise.toml +++ b/mise.toml @@ -1,2 +1,2 @@ [tools] -ruby = "3" +ruby = "3.4.8"