- Python2
Set up and activate a Python2.7 virtual environment. Then,
$ pip install -e .
Additionally, install lc_pdfminer
$ export FLASK_APP=pdf2xml
$ flask run --port=5000
To turn on development features, set the env variable before running.
$ export FLASK_ENV=development
Version is maintained in setup.py
.
python setup.py sdist
will create a development package with “.dev” and the current date appended.
python setup.py release sdist
will create a release package with only the version.
To learn more about the deploy process referenced, read this
Activate the Python2 virtual environment.
- Install gunicorn
$ pip install gunicorn
-
Set the log paths in
gunicorn.conf
-
Configure apache (apache.conf)
<Location "/path/to/pdf2xml-service">
ProxyPass "http://127.0.0.1:5000/"
ProxyPassReverse "http://127.0.0.1:5000/"
</Location>
- Run gunicorn
$ gunicorn -c gunicorn.conf -b 0.0.0.5000 pdf2xml:app
Check the app in the browser, http://your-ip-here/path/to/flaskapp