Skip to content

Commit

Permalink
Add requirements.production.txt, document it.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Sep 11, 2018
1 parent 1c3be6e commit 7ca4fa2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ ENV PATH /tenants2/node_modules/.bin:$PATH

ENV NODE_ENV=production

COPY Pipfile* /tmp/tenants2/
COPY Pipfile* requirements.production.txt /tmp/tenants2/

WORKDIR /tmp/tenants2

RUN pipenv install --system --keep-outdated
RUN pipenv install --system --keep-outdated \
&& pip install -r requirements.production.txt

WORKDIR /tenants2

Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,35 @@ python manage.py runserver

Then visit http://localhost:8000/ in your browser.

### Production dependencies

Some of this project's dependencies are cumbersome
to install on some platforms, so they're not installed
by default.

However, they are present in the Docker development
environment (described below), and they are
required to develop some functionality, as well as
for production deployment. They can be installed via:

```
pipenv run pip install -r requirements.production.txt
```

These dependencies are described below.

#### WeasyPrint

[WeasyPrint][] is used for PDF generation. If it's
not installed during development, then any PDF-related
functionality will fail.

Instructions for installing it can be found on the
[WeasyPrint installation docs][].

[WeasyPrint]: http://weasyprint.org/
[WeasyPrint installation docs]: https://weasyprint.readthedocs.io/en/latest/install.html

## Running tests

To run the back-end Python/Django tests, use:
Expand Down
1 change: 1 addition & 0 deletions requirements.production.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WeasyPrint==0.42.3
1 change: 1 addition & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf

echo "----- Updating Python Dependencies -----"
pipenv install --dev --keep-outdated
pip install -r requirements.production.txt

echo "----- Updating Node Dependencies -----"
npm install --no-save
Expand Down

0 comments on commit 7ca4fa2

Please sign in to comment.