documentation: installation instructions

This commit is contained in:
Antoine Bartuccio 2019-08-11 12:11:35 +02:00
parent b0b52fd714
commit dd49d71cb7
Signed by: klmp200
GPG Key ID: E7245548C53F904B
5 changed files with 77 additions and 3 deletions

View File

@ -2,6 +2,7 @@
[![coverage report](https://ae-dev.utbm.fr/ae/Sith/badges/master/coverage.svg)](https://ae-dev.utbm.fr/ae/Sith/commits/master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://ae-dev.zulipchat.com)
[![Documentation Status](https://readthedocs.org/projects/sith-ae/badge/?version=latest)](https://sith-ae.readthedocs.io/?badge=latest)
## Sith AE
@ -24,8 +25,6 @@ On macos, you will need homebrew
brew install xapian
```
If it doesn't work it's because it need [this pull request](https://github.com/Homebrew/homebrew-core/pull/34835) to be validated.
The development is done with sqlite, but it is advised to set a more robust DBMS for production (Postgresql for example)
### Get started

View File

@ -37,7 +37,7 @@ author = "Bartuccio Antoine (Sli), Brunet Pierre (Krohpil), Jacquet Florent (Ski
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc"]
extensions = ["sphinx.ext.autodoc", "sphinx_copybutton"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

View File

@ -13,6 +13,12 @@ Bienvenue sur la documentation du Sith de l'AE
about/introduction
about/tech
.. toctree::
:maxdepth: 2
:caption: Bien démarrer
start/install
.. toctree::
:maxdepth: 3
:caption: Documentation des apps:

68
doc/start/install.rst Normal file
View File

@ -0,0 +1,68 @@
Installer le projet
===================
Dépendances du système
----------------------
Certaines dépendances sont nécessaires niveau système :
* virtualenv
* limysqlclient
* libssl
* libjpeg
* python3-xapian
* zlib1g-dev
* python3
Sur ubuntu :
.. sourcecode:: bash
sudo apt install libmysqlclient-dev libssl-dev libjpeg-dev zlib1g-dev python3-dev libffi-dev python3-dev libgraphviz-dev pkg-config python3-xapian gettext git
sudo pip3 install virtualenv
Sur macos :
Pour installer les dépendances, il est fortement recommandé d'installer le gestionnaire de paquets `homebrew <https://brew.sh/index_fr>`__.
.. sourcecode:: bash
brew install git python xapian
pip install virtualenv
Installer le projet
-------------------
.. sourcecode:: bash
git clone https://ae-dev.utbm.fr/ae/Sith.git
cd Sith
# Prépare et active l'environnement du projet
virtualenv --system-site-packages --python=python3 env
source env/bin/activate
# Installe les dépendances du projet
pip install -r requirements.txt
# Prépare la base de donnée
./manage.py setup
Configuration pour le développement
-----------------------------------
Lorsqu'on souhaite développer pour le site, il est nécessaire de passer le logiciel en mode debug dans les settings_custom. Il est aussi conseillé de définir l'URL du site sur localhost. Voici un script rapide pour le faire.
.. sourcecode:: bash
echo "DEBUG=True" > sith/settings_custom.py
echo 'SITH_URL = "localhost:8000"' >> sith/settings_custom.py
Démarrer le serveur de développement
------------------------------------
Il faut toujours avoir préalablement activé l'environnement virtuel comme fait plus haut et se placer à la racine du projet. Il suffit ensuite d'utiliser cette commande :
.. sourcecode:: bash
./manage.py runserver

View File

@ -24,3 +24,4 @@ sentry_sdk
# For documentation
Sphinx > 2.0
sphinx_rtd_theme
sphinx-copybutton