...

/

Configure the Production Server

Configure the Production Server

Learn how to configure the production server on Heroku.

Locking Pipfile

The first step to preparing the production server is making sure it has everything it needs. We’ve already discussed the database dependency separately, but the server also requires a number of Python packages, such as SQLAlchemy, as well as the packages SQLAlchemy requires, and so on. Heroku makes life easier by grabbing the right versions of each dependency from the Pipfile.lock file in our repositories and then finding all the packages we’ll need. Generally, the lock file stays up-to-date since it re-locks every time we install or uninstall a package. We can double-check that the lock file is up-to-date by running the following:

$ pipenv lock
Locking [dev-packages] dependencies
✓ Success!
Locking [packages] dependencies
✓ Success!
Updated Pipfile.lock (7dc556)!

Python addon

The application uses Python and, in general, Heroku does a good job of identifying a Python environment by finding the Pipfile. However, we will ...