diff --git a/README.txt b/README.txt index 1b57e22..dcdc69a 100644 --- a/README.txt +++ b/README.txt @@ -1,14 +1,32 @@ # Henry Pump POC Web Interface ## Installation -1. Install nginx, Python 2&3 & venv with `sudo apt-get install nginx python python-pip python3 python3-venv python3-pip` +1. Install nginx, Python 2&3 & venv with ```sudo apt-get install nginx python python-pip python3 python3-venv python3-pip``` -2. From the root of the POC-Java-www directory, run `python3 -m venv env` to create the virtual environment. +2. Cd into the pocwww directory, run ```python3 -m venv env``` to create the virtual environment. -3. Update the install of pip `env/bin/pip install --upgrade pip setuptools` +3. Update the install of pip ```env/bin/pip install --upgrade pip setuptools``` -4. Install the python module `env/bin/pip install .` +4. Install the python module ```env/bin/pip install .``` -5. Test the web server `env/bin/pserve production.ini http_port=8080` +5. Generate HTTPS keys +``` +chmod +x generate_keys.sh +./generate_keys.sh +``` -6. Install nginx and supervisor `pip install supervisor` +5. Test the web server ```env/bin/pserve production.ini http_port=8080``` + +6. Install supervisor ```pip install supervisor``` + +7. Configure supervisor service +```sudo cp supervisord.service /etc/systemd/system/``` + +8. Configure nginx + +``` +sudo cp poc.conf /etc/nginx/sites-available/ +sudo rm /etc/nginx/sites/enabled/default +sudo ln -s /etc/nginx/sites-available/poc.conf /etc/nginx/sites-enabled/ +sudo service nginx restart +``` diff --git a/pocwww/supervisor.conf b/supervisor.conf similarity index 100% rename from pocwww/supervisor.conf rename to supervisor.conf diff --git a/supervisord.service b/supervisord.service index 41809ef..e2b761d 100644 --- a/supervisord.service +++ b/supervisord.service @@ -4,7 +4,7 @@ Documentation=http://supervisord.org After=network.target [Service] -ExecStart=/usr/local/bin/supervisord -n -c /root/POC-Java-www/pocwww/supervisor.conf +ExecStart=/usr/local/bin/supervisord -n -c /root/POC-Java-www/supervisor.conf ExecStop=/usr/local/bin/supervisorctl $OPTIONS shutdown ExecReload=/usr/local/bin/supervisorctl $OPTIONS reload KillMode=process