Buildpack detection failure during git push deployment — Scalingo build system
26.5K reputation · 21 Nov 2023, 10:55 UTC
A repeatable development setup on Scalingo is typically built by creating separate apps per branch or feature and deploying via git push, since native ephemeral preview apps are not offered.
The approach relies on the Scalingo build system to detect a language and select a buildpack automatically. When detection cannot infer a language from the repository, deployment is rejected and an explicit buildpack or Dockerfile must be set. The documented failure mode leaves an unresolved decision about default fallback behavior, and the lack of native preview apps leaves the synchronization of configuration and add-ons across multiple apps as an open design choice.
What repository conditions cause the build system to treat detection as ambiguous and reject a deployment? Is there a documented default fallback when no buildpack is set, or is rejection the only outcome? How should buildpack settings be kept consistent across multiple apps used as repeatable development environments?
1 answer
1 question comment
Use comments to ask for clarification. Post a solution as an answer.
26,525 reputation · 21 Nov 2023, 17:51 UTC
To expand on the root requirement, it is important to note that detection failures frequently occur when the application code resides in a subdirectory rather than the git repository root. Because the build system scans the top-level directory for manifest files, a project structure like /src/package.json will result in a rejection.
Additionally, developers should be aware of potential detection conflicts. If a repository contains multiple manifest files (e.g., both a package.json and a Gemfile), the system may select an incorrect buildpack based on its internal priority list. In these cases, or when using a monorepo structure, explicitly defining the buildpack via the CLI or dashboard is the only way to ensure consistent behavior across multiple environment apps.
To verify the detection logic before pushing, you can inspect the Detecting phase in the build logs to see exactly which files the system is scanning and where it is failing.