Skip to content

Commit

Permalink
docs: update readme-heroku.md to match the current reality
Browse files Browse the repository at this point in the history
  • Loading branch information
joanise committed Dec 13, 2024
1 parent de32331 commit 94a53f1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions readme-heroku.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
Our production Heroku deployment is controlled by the following files:
- `Procfile`: tells Heroku what command to launch in each Dyno;
- `runtime.txt`: tells Heroku which run-time engine to use (i.e., which version of Python);
- `requirements.txt`: tells Heroku what our production dependencies are;
- `bin/post_compile`: Heroku builds run this after doing `pip install -r requirements.txt`.

Heroku detects Python by default, but `runtime.txt` lets us specify/bump the version as needed;
- `requirements.txt`: tells Heroku what our production dependencies are.
Updating dependencies:
- Our dependencies are declared in `pyproject.toml`, edit this file to modify them.
- `requirements.txt` is a generated "lock" file. To update it, run:

hatch env remove prod
rm requirements.txt
hatch env create prod

It is also possible to edit it manually, e.g., to fix a critical vulnerability,
but an occasional full rebuild is a good idea to stay up to date.

Updating `g2p`:
- By default, `g2p` only gets updated for `readalong-studio` on Heroku when:
- we make a new release of `g2p` on PyPI
- we update `requirements.min.txt` here to ask for that release
- we make a new release of `g2p` on PyPI, **and**
- we update `requirements.txt` here to ask for that release
- Manual override: it is also possible to update g2p to the current commit on the `main` branch using this procedure:
- Change `requirements.min.txt` to specify `g2p @ git+https://github.com/roedoejet/g2p@main`.
- Change `requirements.txt` to specify `g2p @ git+https://github.com/roedoejet/g2p@main`.
- Commit that change to `main` in a sandbox connected to Heroku.
- `git push heroku main`
- This will force a build which will fetch the main branch of g2p from GitHub.
Expand Down

0 comments on commit 94a53f1

Please sign in to comment.