Open taraszka opened 1 month ago
Hmm, interesting. If you run it without Procfile Buildpack
, the command that docker run is: /cnb/process/mod
I set the same command in a Procfile and got this error: ERROR: failed to get platform API version; please set 'CNB_PLATFORM_API' to specify the desired platform API version
When I changed Procfile content to: web: /layers/paketo-buildpacks_go-build/targets/bin/mod
, it worked.
echo "web: /cnb/process/mod" > Procfile
You would not want to do this. If there is an entry under /cnd/process/*
that already exists, you don't need to also add a Procfile entry. Your entries in Procfile would point to commands that you want it to run to start your app like web: python app.py
or web: node index.js
or whatever is used to start your app.
In turn, the Procfile buildpack will create corresponding entries for those processes under /cnb/process/*
, so if you set a web: python app.py
, then you'll end up with /cnb/process/web
which will execute python app.py
when run.
In your case, the Go buildpack is creating /cnb/process/mod
, so you just don't need the Procfile`, unless you have some other command you want to run.
Hope that helps! Let me know if you have any more questions.
It seems there is something wrong. I had a similar error with
.NET Core
Buidpack and Procfile.Expected Behavior
It should just work.
Current Behavior
ERROR: failed to get platform API version; please set 'CNB_PLATFORM_API' to specify the desired platform API version
Possible Solution
N/A
Steps to Reproduce
Motivations
I am working on a new project written in Go that has to use Paketo buildpacks (as a requirement) and be compatible with Heroku's Procfile. That's it.