Railway's Metal builder (Railpack v0.23) was rejecting backend_api_python/Dockerfile because the platform-level "acceptChildOfRepoRoot" guard refuses to build a Dockerfile that sits below the service Root Directory, and Railpack itself has no Dockerfile provider — only language autodetection — so the build fell through to "could not determine how to build the app".
Setting Root Directory = backend_api_python in the Railway service makes this file the effective build manifest: it pins the DOCKERFILE builder against the existing Dockerfile, with the same /api/health probe docker-compose already uses.