Google Cloud setup

The app runs on Cloud Run. Reports live in a private Cloud Storage bucket, the NM license is mounted from Secret Manager, and the container image lives in Artifact Registry.

1. Create or select the project

Sign in with the NM FinTech Google Cloud account. Choose the organization or folder and billing account. A Cloud administrator can create the project and grant the deployer permission to enable APIs, build images, deploy Cloud Run, and manage the runtime identity, bucket and license secret.

gcloud auth login
export PROJECT_ID=YOUR_PROJECT_ID
gcloud projects create "$PROJECT_ID" --name="NM FinTech Portfolio Optimizer"
gcloud billing projects link "$PROJECT_ID" --billing-account=YOUR_BILLING_ACCOUNT

For an existing project, use its ID and skip project creation. Use the intended organization or folder in the project creation command if required by its policy.

2. Build and deploy

From the application repository, sign in to GitHub CLI with read access to the AlgoQuant 3.3.2 release, and provide a valid NM runtime license. If Secret Manager already contains the license in portoptim-nm-license, omit NM_LICENSE_FILE. The deployment script checks dependency hashes, configures an instance identity with bucket-scoped access, creates the license secret if absent, submits Cloud Build and deploys Cloud Run. The build identity needs permission to write to the regional Artifact Registry repository.

gh auth login
export NM_LICENSE_FILE=/absolute/path/to/nm.lic
./scripts/deploy.sh

The first deployment requires authentication. Grant a smoke tester Cloud Run Invoker and use gcloud run services proxy portoptim --region=us-central1 --project="$PROJECT_ID" to test locally, or invoke the service with a Google identity token. Check the demo, a live run and saved-run retrieval. When ready for public access, redeploy with PUBLIC_APP=1 ./scripts/deploy.sh. Organization policies may require an alternative public access setup. To rotate the license, add a new version in Secret Manager and deploy a fresh revision.

3. Connect the custom domain

Check who owns the current DNS record for portoptim.nmfin.tech before changing it. Verify nmfin.tech ownership in Google Search Console, then configure the domain mapping for Cloud Run in a supported region.

gcloud beta run domain-mappings create --service=portoptim   --domain=portoptim.nmfin.tech --region=us-central1 --project="$PROJECT_ID"
gcloud beta run domain-mappings describe --domain=portoptim.nmfin.tech   --region=us-central1 --project="$PROJECT_ID"

Use the records returned by Google at the authoritative DNS provider after confirming the existing target can be replaced. Direct Cloud Run mapping is a preview feature. If the organization uses a Google Cloud external Application Load Balancer, route the hostname through it using a Cloud Run serverless NEG and managed TLS certificate. After DNS and certificate provisioning, verify https://portoptim.nmfin.tech/healthz and run the browser demo again.

4. Publish the wiki

Publish only the content of docs/ at the root of the public nmltd/algoquant-portoptim-docs repository. Under Settings → Pages, choose Deploy from a branch and select main and / (root). Verify https://nmltd.github.io/algoquant-portoptim-docs/.