From 6fd431181aa88a2f661ed6e9689b30facb1e2313 Mon Sep 17 00:00:00 2001 From: Aaro Koivukangas Date: Wed, 2 Aug 2023 11:55:03 +0300 Subject: [PATCH] added small documentation --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..bc698d7 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Sossu flask +This is the sossu's main page. + +## Running +To run this on this server, one should just start the systemd service sossu-flask.service with +the command +```bash +systemctl start sossu-flask.service +``` + +There exists a symlink from `sossunVerkkosivut/sossu-flask.service -> /etc/systemd/system/sossu-flask.service`. +The systemd service file waits for network connectivity before starting and should be enabled by default to run +after system rebooting or on failure. + +If systemd service is not needed the app can be run by +```bash +python wsgi.py +``` + + +## Virtual environment +If one needs to update the `pip` packages or something else to do with such things, there exists a virtual env +at `.venv`. If that does not exist, create it with `python -m venv .venv` + +After that you need to activate it with (in linux at least) +```bash +source .venv/bin/activate +``` + +Then you can install the required packages with +```bash +pip install -r requirements.txt +```