aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7d7a087..0b52be4 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ a simple web app that converts markdown to pdf.
- python 3.10+
- system packages: `libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 shared-mime-info`
+- gunicorn (installed from `requirements.txt`)
## image usage
@@ -29,11 +30,34 @@ a simple web app that converts markdown to pdf.
### local
```bash
+python -m venv .venv
+source .venv/bin/activate
pip install -r requirements.txt
cd src/
python3 app.py
```
+### production (vps + nginx)
+
+```bash
+cd src/
+../.venv/bin/gunicorn \
+ --bind 127.0.0.1:5001 \
+ --workers 2 \
+ --threads 4 \
+ --timeout 180 \
+ --graceful-timeout 30 \
+ --access-logfile - \
+ --error-logfile - \
+ app:app
+```
+
+nginx should reverse proxy to `127.0.0.1:5001` and pass:
+
+- `X-Forwarded-For`
+- `X-Forwarded-Proto`
+- `X-Forwarded-Host`
+
### docker
```bash