0

I am working on a Web API that uses Flask with Python to provide functionality that is provided by an executable file. The setup works locally but I want to set up the Web API on Heroku.

I am running into an issue with the fact that executable files that I push along with the code do not have permission to execute. I cannot use chmod +x <executable> since the moment the dyno is destroyed the permissions are reset.

Alternative ways to deploy the Web API are also welcome. Thanks in advance!

davidism
  • 121,510
  • 29
  • 395
  • 339

1 Answers1

0

Git tracks the executable bit of files. You should be able to make the file executable locally, then commit and redeploy:

chmod +x <executable>
git add <executable>
git commit -m "Set executable bit on <executable>"
git push heroku

Though if it is available via an Ubuntu package you'll be better served by not tracking it at all and installing it via the Apt buildpack.

There may be other options as well, but without more information about what <executable> is and where it comes from it's hard to suggest the right solution.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257