Custom build script for Django app


I’m trying to run a custom build script for my Django app by setting the build command to “bash”. The script is located at the root directory and contains the following:

#!/usr/bin/env bash
set -o errexit
pip install --upgrade pip
pip install -r requirements_py311.txt
pip install --upgrade --no-cache-dir git+https://${GITHUB_USER}:${GITHUB_TOKEN}
python collectstatic --no-input
python migrate

However, it fails with an “ERROR: No buildpack groups passed detection”. Could you please help me solve this issue?

Hi @Antoine_Louis,

Our build engine relies on the presence of a requirements.txt or file in the root of your project directory to detect Python apps. In this cases, it seems the requirements.txt it’s called requirements_py311.txt, causing the detection failure you are facing.

This is briefly mentioned in the doc here: Python | Koyeb

If you rename or link your requirements file to requirements.txt, this should work.

Let us know if this solves the problem!