diff --git a/README.md b/README.md index b1ec4cbf2acd08d40c9311f6a75fef0ddc524590..41e86d4a21dafa47e86bee7a39d583d0a072cf50 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,50 @@ +# VIPSWeb This is the code for the public webpage for VIPS. It should be adaptable enough to suit many organizations. -The programming language is Python >= 3.6 and the web framework is currently Django 3.1 -Running with mod_wsgi +## Requirements +The system has been tested and found to run well on Ubuntu >= 18 +* The programming language is Python >= 3.6 +* The web framework is currently Django 3.1 +* Apache web server with mod_wsgi compiled for Python 3 -If running on e.g. Ubuntu 18, please remember to install the libapache2-mod-wsgi-py3 and not the libapache2-mod-wsgi package \ No newline at end of file +## Install and setup +1. Install and activate a virtual Python environment + +``` +python3 -m venv my_venv +source my_env/bin/activate + +``` + +2. Install all the requirements into the virtual environment. +Remember to be in the folder where the requirements.txt file is + +``` +pip install -r requirements.txt +``` + +3. Run all database migrations + +``` +./manage.py migrate +``` + +## Running with mod_wsgi + +* If running on e.g. Ubuntu 18, please remember to install the `libapache2-mod-wsgi-py3` and not the `libapache2-mod-wsgi` package +* Here's an example mod_wsgi configuration in an Apache2 virtualhost + +``` + WSGIDaemonProcess vipsweb python-path=/opt/VIPSWeb/VIPSWeb python-home=/opt/VIPSWeb/py3dj3 + WSGIProcessGroup vipsweb + + WSGIScriptAlias / /opt/VIPSWeb/VIPSWeb/VIPSWeb/wsgi.py + + <Directory /opt/VIPSWeb/VIPSWeb/VIPSWeb> + <Files wsgi.py> + Require all granted + </Files> + </Directory> + +``` \ No newline at end of file