MkDocs
Avertissement
/! Cette installation est à utiliser en environnement de test /!\
Installation des dépendances
Bash |
---|
| apt install python3-pip -y
|
Installation
Bash |
---|
| pip install mkdocs-material
|
Utilisateur et groupe
Créer un utilisateur mkdocs pour limiter les accès au service mkdocs
Bash |
---|
| adduser --system --group mkdocs
|
Création d'un service
Bash |
---|
| nano /etc/systemd/system/mkdocs.service
|
Text Only |
---|
| [Unit]
Description=MKDocs
After=network.target
ConditionPathExists=/mkdocs
[Service]
Type=simple
User=mkdocs
Group=mkdocs
Restart=on-failure
RestartSec=5
RemainAfterExit=yes
WorkingDirectory=/mkdocs
ExecStart=/usr/local/bin/mkdocs serve -a 0.0.0.0:10800
[Install]
WantedBy=multi-user.target
|
Ne pas hésiter à modifier le port dans l'option -a
Bash |
---|
| systemctl enable mkdocs --now
|