From 170a5165cd3c4e4393ebdd4f49469dd9d6da6c94 Mon Sep 17 00:00:00 2001 From: Estelle Perez Date: Wed, 4 May 2022 15:19:40 +0000 Subject: [PATCH] Update README.md --- README.md | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3b9222e..09660ef 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,44 @@ # Installation ## Installation des pré-requis -`sudo apt update - sudo apt install git virtualenv python3-dev build-essential mariadb-server gettext libzip-dev libssl-dev - sudo apt install python3-mysqldb/stable` +```bash +sudo apt update +sudo apt install git virtualenv python3-dev build-essential mariadb-server gettext libzip-dev libssl-dev +sudo apt install python3-mysqldb/stable +``` ## Création utilisateur -`adduser --system \ +```bash +adduser --system \ --home /srv/petition.chalec.org/ \ --shell /bin/bash \ --group \ - pytition` - + pytition +``` Connection de l'utilisateur : -`su pytition` +```bash +su pytition +``` ## Création des dossiers -`mkdir -p /srv/petition.chalec.org/tools - mkdir -p /srv/petition.chalec.org/www/{static,mediaroot}` +```bash +mkdir -p /srv/petition.chalec.org/tools +mkdir -p /srv/petition.chalec.org/www/{static,mediaroot} + ``` ## Installation Récupération de la version : -`version=$(curl -s https://api.github.com/repos/pytition/pytition/releases/latest | grep "tag_name" | cut -d : -f2,3 | tr -d \" | tr -d ,)` -`virtualenv -p python3 pytition_venv +```bash +version=$(curl -s https://api.github.com/repos/pytition/pytition/releases/latest | grep "tag_name" | cut -d : -f2,3 | tr -d \" | tr -d ,) +``` + +```bash +virtualenv -p python3 pytition_venv wget https://github.com/pytition/Pytition/archive/refs/tags/v2.4.tar.gz tar -xvf v2.4.tar.gz -C ~/www --strip 1 source ./pytition_venv/bin/activate cd ~/www/ - pip3 install -r requirements.txt` + pip3 install -r requirements.txt + ```