All "Source" deployment apps fail to publish: Cloud Build error "Dockerfile not found"

PROJECT: gen-lang-client-07023420..(Smartped and Chatbot)
REGION: us-east1
AFFECTED SERVICES: encomenda-com-smartped, otimizador-de-pedidos-smartped, teste-de-conex-o (and any new service created via AI Studio Build publish in this project)

PROBLEM SUMMARY:
Since 08/09/2026 at 20:43 (BRT), all Cloud Run deployments originating from Google AI Studio Build in this project have been failing at the traffic routing step with the generic error:
“The service has encountered an internal error. Please try again later”

The Cloud Run audit log shows more than 10 cycles of CreateService / UpdateService / ReplaceService / DeleteService between 08/09 20:43 and 08/10 19:22, all with an identical failure, including attempts with different service names and domains (encomenda-smt-novo.ai.studio, encomenda-v4-ok.ai.studio, encomendanova.ai.studio, encomenda-v4.ai.studio).

SPECIFIC ERRORS FOUND:

  1. In Cloud Build (for “Source” type deployments), the build fails with:
    unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile: no such file or directory
    ERROR: build step 0 ".io/cloud-builders/gcb-internal " failed: step exited with non-zero status: 1
    The executed command is: docker build --network cloudbuild --no-cache -t .io/gen-lang-client-07023420../ .
    The source package sent by the AI Studio publish pipeline does not contain a Dockerfile in the root.

  2. In the log of the encomenda-com-smartped service, the Cloud SQL Proxy sidecar logged:
    proxy server error: accept unix /app/cloudsql/gen-lang-client-07023420…:us-east1:ai-studio-156c7800/.s.PGSQL.5432: use of closed network connection

WHAT HAS ALREADY BEEN RULED OUT AS A CAUSE:

  • Billing: active account linked to the project (confirmed in the Billing Console)
  • Corrupted state of a specific service: service deleted and recreated from scratch multiple times, same failure persists
  • General Google Outage: Google AI Studio shows “All Systems Operational”, with no active incidents
  • Cloud SQL instance health: ai-studio-156c7800 instance has a healthy (green) status in the Cloud SQL Console
  • IAM Permissions: the service account 887122622666-compute@developer.gserviceaccount already has the “Cloud SQL Client” role in the project
  • NODE_ENV=production environment variable: added to the service, with no change in the outcome

REQUEST:
I need an investigation on the Google infrastructure side (Cloud Run / AI Studio Build publish pipeline) to identify why traffic routing consistently fails in this project, despite the configuration being correct. I also need to understand why the AI Studio Build source package does not include the Dockerfile expected by Cloud Build.

The build is failing because the Source archive that AI Studio uploads to Cloud Build does not contain a Dockerfile at the root, so `docker build .` has nothing to work with.

A few things that usually fix this:

1. Confirm whether the app is being treated as a pure “Source” deployment or a container deployment. Some AI Studio flows expect an explicit Dockerfile for the latter.

2. Try adding a minimal Dockerfile at the project root (even a simple one that starts from a Python base + your start command) and republish.

3. Check the exact files included in the source archive that gets uploaded — sometimes generated files or the way the project is packaged omit the Dockerfile.

If you can share the Cloud Build log snippet or confirm the app type (Python/FastAPI or other), I can suggest the exact Dockerfile content that usually works for these publishes.

Hi Josh_Fynly,

Thank you so much for your help and insights! I wanted to let you know that I finally managed to sort everything out and get it running smoothly.

Interestingly enough, the root of the problem was actually baked into the template generated by AI Studio itself. The initial setup had a hardcoded port (3000) and was trying to run the Vite development middleware even in the production environment, which was causing the 404 errors on Cloud Run.

To resolve it, I adjusted the server code to dynamically handle process.env.PORT (defaulting to 8080 for Cloud Run) and updated the environment check so that when NODE_ENV === "production", it completely bypasses Vite and serves the pre-built static files directly through Express.

Thanks again for your time and support!