Skip to Content
DocumentationDeploymentInfrastructure

Deployment

Infrastructure, configuration, and deployment reference for GoTamil API.

Cloud Run

PropertyValue
IngressInternal load balancer only
Max instances20
Request timeout30 seconds
Port8080
Containernode:22-bookworm-slim (multi-stage build)

Environments

EnvironmentService NameCloud Tasks QueueTerraform State
Devgotamil-api-devgotamil-api-operations-devGCS
Staginggotamil-api-staginggotamil-api-operations-stagingPending
Prodgotamil-api-prodgotamil-api-operations-prodPending

Service Accounts

Runtime (gotamil-api-runtime)

  • Secret Manager accessor
  • Cloud Logging writer
  • Cloud Monitoring metrics writer
  • Cloud Tasks enqueuer + viewer
  • Self-impersonation (OIDC token generation)

Deploy (gotamil-api-deploy)

  • Cloud Run admin
  • Runtime service account impersonation

Cloud Tasks

PropertyValue
Queuegotamil-api-operations-{env}
Max retries5
Backoff2s min, 30s max
Logging100% sampling

Configuration Reference

Core

VariableDefaultDescription
NODE_ENVdevelopmentRuntime environment
PORT8080Server port
LOG_LEVELinfoLogging level

Storage

VariableDefaultDescription
STORE_BACKENDmemorymemory or prisma
DATABASE_URLPostgreSQL URL (required for prisma)

Provider

VariableDefaultDescription
PROVIDER_BACKENDmockmock or gemini
PROVIDER_SECRET_RESOLUTION_MODEenvenv or db
GEMINI_API_KEY_SECRETSecret Manager ref
GEMINI_MODELgemini-2.5-flashDefault model
GEMINI_REQUEST_TIMEOUT_MS30000Request timeout

Async Processing

VariableDefaultDescription
ASYNC_BACKENDmemorymemory or cloud-tasks
SYNC_TIMEOUT_MS8000Sync processing timeout
SYNC_TEXT_THRESHOLD1200Char threshold for async routing
CLOUD_TASKS_PROJECT_IDGCP project ID
CLOUD_TASKS_LOCATIONasia-southeast1Queue region
CLOUD_TASKS_QUEUEgotamil-api-operationsQueue name

Authentication

VariableDefaultDescription
OIDC_ISSUERhttps://nimir.internalToken issuer
OIDC_AUDIENCEgotamil-apiToken audience
OIDC_TENANT_CLAIMtenant_idJWT claim for tenant ID
OIDC_JWKS_JSONJWKS set (required in production)
INTERNAL_TASK_AUTH_MODEtokentoken or oidc

Invites & Email

VariableDefaultDescription
CONSOLE_BASE_URLhttp://localhost:3000Admin console URL
INVITE_TOKEN_SECRETHMAC signing secret
INVITE_DEFAULT_TTL_HOURS72Invite expiry
INVITE_EMAIL_DELIVERY_MODEnonenone or zepto

Health Checks

EndpointPurposeAuth
GET /v1/healthLiveness — lightweight pingNone
GET /v1/readyReadiness — checks all 6 dependenciesNone

Readiness checks: repository, provider, async_backend, auth, identity_auth, internal_task_auth.

Last updated on