chore(backend): make dev deploy frontend-callable

This commit is contained in:
zouantchaw
2026-02-24 09:09:08 -05:00
parent 1876441a12
commit d3aec0da0b
2 changed files with 5 additions and 2 deletions

View File

@@ -10,3 +10,4 @@
| 2026-02-24 | 0.1.5 | Added backend makefile module and CI workflow for backend target validation. |
| 2026-02-24 | 0.1.6 | Added Cloud SQL-backed idempotency storage, migration script, and command API test coverage. |
| 2026-02-24 | 0.1.7 | Added `/health` endpoints and switched smoke checks to `/health` for Cloud Run compatibility. |
| 2026-02-24 | 0.1.8 | Enabled dev frontend reachability and made deploy auth mode environment-aware (`dev` public, `staging` private). |

View File

@@ -20,9 +20,11 @@ BACKEND_STAGING_PRIVATE_BUCKET ?= krow-workforce-staging-private
ifeq ($(ENV),staging)
BACKEND_PUBLIC_BUCKET := $(BACKEND_STAGING_PUBLIC_BUCKET)
BACKEND_PRIVATE_BUCKET := $(BACKEND_STAGING_PRIVATE_BUCKET)
BACKEND_RUN_AUTH_FLAG := --no-allow-unauthenticated
else
BACKEND_PUBLIC_BUCKET := $(BACKEND_DEV_PUBLIC_BUCKET)
BACKEND_PRIVATE_BUCKET := $(BACKEND_DEV_PRIVATE_BUCKET)
BACKEND_RUN_AUTH_FLAG := --allow-unauthenticated
endif
BACKEND_CORE_IMAGE ?= $(BACKEND_REGION)-docker.pkg.dev/$(GCP_PROJECT_ID)/$(BACKEND_ARTIFACT_REPO)/core-api:latest
@@ -111,7 +113,7 @@ backend-deploy-core:
--project=$(GCP_PROJECT_ID) \
--service-account=$(BACKEND_RUNTIME_SA_EMAIL) \
--set-env-vars=APP_ENV=$(ENV),GCP_PROJECT_ID=$(GCP_PROJECT_ID),PUBLIC_BUCKET=$(BACKEND_PUBLIC_BUCKET),PRIVATE_BUCKET=$(BACKEND_PRIVATE_BUCKET) \
--no-allow-unauthenticated
$(BACKEND_RUN_AUTH_FLAG)
@echo "✅ Core backend service deployed."
backend-deploy-commands:
@@ -125,7 +127,7 @@ backend-deploy-commands:
--project=$(GCP_PROJECT_ID) \
--service-account=$(BACKEND_RUNTIME_SA_EMAIL) \
--set-env-vars=APP_ENV=$(ENV),GCP_PROJECT_ID=$(GCP_PROJECT_ID),PUBLIC_BUCKET=$(BACKEND_PUBLIC_BUCKET),PRIVATE_BUCKET=$(BACKEND_PRIVATE_BUCKET) \
--no-allow-unauthenticated
$(BACKEND_RUN_AUTH_FLAG)
@echo "✅ Command backend service deployed."
backend-deploy-workers: