From 464bc46361c5bc7ddab59b258364ed0e8759ce7c Mon Sep 17 00:00:00 2001
From: David Huss <dh@atoav.com>
Date: Wed, 18 Nov 2020 16:31:19 +0100
Subject: [PATCH] Add venv to readme

---
 README.md | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 19b06af..0f422fb 100755
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 
-## Run dev-server
+## Run dev-server with poetry
 To make a development server run on localhost:
 ```python3
 export FLASK_APP=stechuhr_server/server.py
@@ -7,3 +7,29 @@ export FLASK_ENV=development
 poetry run flask run --cert=adhoc
 ```
 
+## Run with python3-ven in production
+
+Make sure `python3-venv` is installed:
+
+```bash
+sudo apt install python3-venv
+```
+
+Then clone the repo and enter it:
+
+```bash
+git clone ssh://git@code.hfbk.net:4242/pandemic_response/stechuhr-server.git
+cd stechuhr-server
+```
+
+Create a new venv environment, activate it, install the reuqirements from requirements.txt and start the server
+```
+python3 -m venv env
+source env/bin/activate
+pip3 install -r requirements.txt
+python3 stechuhr_server/server.py
+```
+
+Check the output to find the config directory. You might want to run it as a different user tho.
+
+There is also a systemctl unit file that you probably need to change to your needs
\ No newline at end of file
-- 
GitLab