Zynnode logoZynnode

Deploy to GCP

Deploy your app to Google Cloud — Cloud Run, App Engine, or Compute Engine.

Zynnode supports three deployment targets on Google Cloud Platform. This guide explains what each one does, which apps they're best suited for, and what to expect after deployment.

Before deploying, make sure you've connected your GCP account.

Choosing a Deployment Target

During the project configuration step, you'll pick a deployment target from the dropdown. Here's how to choose:

TargetBest ForWhat You Get
Cloud RunContainerized web apps, APIsA fully managed container platform with auto-scaling to zero
App EngineFull-stack web appsA managed platform where Google handles the infrastructure
Compute EngineApps that need full server controlA virtual machine running your app

Cloud Run is Google's fully managed container platform. Zynnode packages your app into a container, pushes it to Google's container registry, and deploys it as a Cloud Run service. Your app scales automatically — including down to zero when there's no traffic.

What Happens During Deployment

  1. Zynnode runs your build command.
  2. A container image is built from your application.
  3. The image is pushed to Artifact Registry in your GCP project.
  4. A Cloud Run service is created (or updated) with the new image.
  5. Your app is accessible at the Cloud Run URL.

After Deployment

  • Your live URL looks like https://your-app-abc123-uc.a.run.app. You can add a custom domain.
  • Cloud Run automatically scales based on traffic. If nobody is using your app, it scales to zero and you pay nothing.
  • Subsequent deployments update the service with zero downtime.

Things to Check in Google Cloud Console

If your app deploys but returns a 403 Forbidden or Unauthenticated error:

  1. Open the Google Cloud Console.
  2. In the left sidebar, navigate to Cloud Run.
  3. Click on your service name.
  4. Go to the Security tab.
  5. Under Authentication, make sure Allow unauthenticated invocations is selected.

If it's set to "Require authentication," external visitors can't access your app. To change it:

  1. Click Edit & Deploy New Revision at the top.
  2. Go to the Security tab in the revision settings.
  3. Select Allow unauthenticated invocations.
  4. Click Deploy.

Make sure your app reads the port from the environment using process.env.PORT. Cloud Run assigns a port dynamically and expects your app to listen on it. Don't hardcode a port like 3000.

Good to Know

  • Auto-scaling — Cloud Run scales to zero by default, which means your app may experience a brief "cold start" delay on the first request after being idle.
  • Pricing — You only pay while your app is processing requests. This makes Cloud Run one of the most cost-effective options for apps with variable traffic.
  • WebSockets — Cloud Run supports WebSocket connections, but there's a 60-minute timeout per connection by default.

App Engine is Google's managed application platform. Zynnode deploys your app to App Engine, and Google manages the underlying servers, scaling, and load balancing.

What Happens During Deployment

  1. Zynnode runs your build command.
  2. The application is packaged and uploaded to App Engine.
  3. App Engine creates a new version of your service.
  4. Traffic is routed to the new version.
  5. Your app is accessible at https://your-project-id.appspot.com.

After Deployment

  • Your live URL is https://your-project-id.appspot.com. You can add a custom domain.
  • App Engine handles scaling, load balancing, and SSL automatically.
  • By default, App Engine always keeps at least one instance running (unlike Cloud Run which can scale to zero).

Things to Check in Google Cloud Console

If your app is deployed but returns errors:

  1. Open the Google Cloud Console.
  2. Navigate to App EngineVersions in the left sidebar.
  3. Make sure the latest version is serving traffic (it should have a green checkmark).
  4. Click on the version to view logs and diagnose issues.

Good to Know

  • Always-on — App Engine keeps instances running by default, which means faster response times but a predictable cost even with no traffic.
  • Automatic updates — Each deployment creates a new "version." You can roll back to a previous version from the App Engine console if something goes wrong.
  • Region-locked — App Engine apps are deployed to a single region that you choose during GCP project setup. This can't be changed later.

Compute Engine gives you a full virtual machine (VM) running in Google Cloud. Zynnode provisions the VM, deploys your app, and starts the process.

What Happens During Deployment

  1. Zynnode runs your build command.
  2. A VM instance is created (or updated) in your GCP project.
  3. Your built application is transferred to the VM and started.
  4. Your app is accessible at the VM's public IP address.

After Deployment

  • Your live URL is the VM's external IP, shown in your Zynnode dashboard.
  • The VM runs continuously — your app is always on.
  • Subsequent deployments update the app on the same VM.

Things to Check in Google Cloud Console

If your app deploys but you can't access it in a browser:

  1. Open the Google Cloud Console.
  2. Navigate to Compute EngineVM Instances in the left sidebar.
  3. Find your VM and click on it.
  4. Scroll down to the Firewalls section.
  5. Make sure both Allow HTTP traffic and Allow HTTPS traffic are checked.

If they're not checked:

  1. Click Edit at the top of the VM details page.
  2. Scroll to the Firewalls section.
  3. Check both boxes: Allow HTTP traffic and Allow HTTPS traffic.
  4. Click Save.

Just like with other VM-based targets, make sure your app listens on 0.0.0.0 and reads the port from the environment. Apps that bind to localhost or 127.0.0.1 will reject external traffic.

Good to Know

  • VM cost — Compute Engine VMs run 24/7 and are billed per second. Check your GCP billing dashboard to monitor usage.
  • Full control — Unlike Cloud Run or App Engine, you get a full VM. This is useful for apps that need specific system packages or background processes.
  • Persistent disk — Your VM comes with a persistent disk, so data stored on the file system survives restarts.

Common Tips for All GCP Targets

  • Environment variables: Set them in the Zynnode dashboard under your project settings. They're injected at build time and/or runtime depending on your target. See Environment Variables.
  • Custom domains: Once deployed, you can add a custom domain through the Zynnode dashboard.
  • Service account permissions: If deployments fail with "permission denied," double-check that your service account has all four required roles: Cloud Run Admin, Storage Admin, Service Account User, and Artifact Registry Writer. See Connecting GCP for details.
  • Build failures: If the deployment fails during the build step, check the build logs in the Zynnode dashboard. For provider-specific runtime errors, see Troubleshooting.
Was this page helpful?