mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
documentation: installation instructions
This commit is contained in:
parent
b0b52fd714
commit
dd49d71cb7
@ -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
|
||||
|
@ -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"]
|
||||
|
@ -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
68
doc/start/install.rst
Normal 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
|
@ -24,3 +24,4 @@ sentry_sdk
|
||||
# For documentation
|
||||
Sphinx > 2.0
|
||||
sphinx_rtd_theme
|
||||
sphinx-copybutton
|
||||
|
Loading…
Reference in New Issue
Block a user