1

I want to deploy a Python application on Heroku. I know that by default Heroku installs requirements specified in /requirements.txt. However, I want to be able to set the location of the requirements (e.g. using environment variables). Is it possible?

It is motivated by using various packages in different environments. It other words, I want to install packages listed in /requirements/production.txt on a production server and use /requirements/development.txt on a development server (both running on Heroku).

Tatarkow
  • 529
  • 4
  • 12
  • Did you have a look into https://stackoverflow.com/questions/17803829/how-to-customize-a-requirements-txt-for-multiple-environments ? Could answer your question. – squeezer44 Nov 25 '20 at 13:44
  • Yes. The first answer hard-codes `-r requirements/prod.txt`, which I cannot do, since I want this to be based on the environment. The second answer uses pipenv, which might work, but I don't want to change package manager because of Heroku. The third answer does not take Heroku into account at all. – Tatarkow Nov 27 '20 at 13:57

0 Answers0