Verified Commit dd49d71c authored by Sli's avatar Sli
Browse files

documentation: installation instructions

parent b0b52fd7
...@@ -2,6 +2,7 @@ ...@@ -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) [![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) [![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) [![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 ## Sith AE
...@@ -24,8 +25,6 @@ On macos, you will need homebrew ...@@ -24,8 +25,6 @@ On macos, you will need homebrew
brew install xapian 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) The development is done with sqlite, but it is advised to set a more robust DBMS for production (Postgresql for example)
### Get started ### Get started
......
...@@ -37,7 +37,7 @@ author = "Bartuccio Antoine (Sli), Brunet Pierre (Krohpil), Jacquet Florent (Ski ...@@ -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 # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = ["sphinx.ext.autodoc"] extensions = ["sphinx.ext.autodoc", "sphinx_copybutton"]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"] templates_path = ["_templates"]
......
...@@ -13,6 +13,12 @@ Bienvenue sur la documentation du Sith de l'AE ...@@ -13,6 +13,12 @@ Bienvenue sur la documentation du Sith de l'AE
about/introduction about/introduction
about/tech about/tech
.. toctree::
:maxdepth: 2
:caption: Bien démarrer
start/install
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 3
:caption: Documentation des apps: :caption: Documentation des apps:
......
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
\ No newline at end of file
...@@ -24,3 +24,4 @@ sentry_sdk ...@@ -24,3 +24,4 @@ sentry_sdk
# For documentation # For documentation
Sphinx > 2.0 Sphinx > 2.0
sphinx_rtd_theme sphinx_rtd_theme
sphinx-copybutton
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment