FitTrackee/docs/fr/installation.html

1375 lines
82 KiB
HTML
Raw Normal View History

<!doctype html>
2023-06-18 15:23:33 +02:00
<html class="no-js" lang="fr">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
2023-06-18 20:45:39 +02:00
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Recherche" href="search.html" /><link rel="next" title="Interface de ligne de commande" href="cli.html" /><link rel="prev" title="OAuth 2.0" href="oauth.html" />
2020-12-30 11:12:35 +01:00
<!-- Generated with Sphinx 7.0.1 and Furo 2023.05.20 -->
2023-06-18 15:23:33 +02:00
<title>Installation - Documentation FitTrackee 0.7.17</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=e6660623a769aa55fea372102b9bf3151b292993" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
2022-11-27 12:06:42 +01:00
<link rel="stylesheet" type="text/css" href="_static/css/fork-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="_static/css/custom.css" />
<style>
body {
--color-code-background: #eeffcc;
--color-code-foreground: black;
}
@media not print {
body[data-theme="dark"] {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}
}
}
</style></head>
<body>
<script>
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
</script>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-toc" viewBox="0 0 24 24">
<title>Contents</title>
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
</svg>
</symbol>
<symbol id="svg-menu" viewBox="0 0 24 24">
<title>Menu</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
<title>Expand</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</symbol>
<symbol id="svg-sun" viewBox="0 0 24 24">
<title>Light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</symbol>
<symbol id="svg-moon" viewBox="0 0 24 24">
<title>Dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
</svg>
</symbol>
<symbol id="svg-sun-half" viewBox="0 0 24 24">
<title>Auto light/dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<circle cx="12" cy="12" r="9" />
<path d="M13 12h5" />
<path d="M13 15h4" />
<path d="M13 18h1" />
<path d="M13 9h4" />
<path d="M13 6h1" />
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
<label class="overlay sidebar-overlay" for="__navigation">
<div class="visually-hidden">Hide navigation sidebar</div>
</label>
<label class="overlay toc-overlay" for="__toc">
<div class="visually-hidden">Hide table of contents sidebar</div>
</label>
2020-12-30 11:12:35 +01:00
<div class="page">
<header class="mobile-header">
<div class="header-left">
<label class="nav-overlay-icon" for="__navigation">
<div class="visually-hidden">Toggle site navigation sidebar</div>
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
</label>
</div>
<div class="header-center">
2023-06-18 15:23:33 +02:00
<a href="index.html"><div class="brand">Documentation FitTrackee 0.7.17
</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
2020-12-30 11:12:35 +01:00
</button>
</div>
<label class="toc-overlay-icon toc-header-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
<div class="sidebar-logo-container">
<img class="sidebar-logo" src="_static/ft-logo.png" alt="Logo"/>
</div>
2023-06-18 15:23:33 +02:00
<span class="sidebar-brand-text">Documentation FitTrackee 0.7.17
</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
2023-06-18 15:23:33 +02:00
<input class="sidebar-search" placeholder="Recherche" name="q" aria-label="Recherche">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul class="current">
2023-06-18 20:45:39 +02:00
<li class="toctree-l1"><a class="reference internal" href="features.html">Fonctionnalités</a></li>
2023-04-12 17:32:08 +02:00
<li class="toctree-l1"><a class="reference internal" href="oauth.html">OAuth 2.0</a></li>
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Installation</a></li>
2023-06-18 20:45:39 +02:00
<li class="toctree-l1"><a class="reference internal" href="cli.html">Interface de ligne de commande</a></li>
<li class="toctree-l1"><a class="reference internal" href="third_party_tools.html">Outils tiers</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="api/index.html">Documentation de lAPI</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Documentation de lAPI</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="api/auth.html">Authentification et compte</a></li>
<li class="toctree-l2"><a class="reference internal" href="api/configuration.html">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="api/oauth2.html">OAuth2</a></li>
<li class="toctree-l2"><a class="reference internal" href="api/records.html">Records</a></li>
<li class="toctree-l2"><a class="reference internal" href="api/sports.html">Sports</a></li>
2023-06-18 20:45:39 +02:00
<li class="toctree-l2"><a class="reference internal" href="api/stats.html">Statistiques</a></li>
<li class="toctree-l2"><a class="reference internal" href="api/users.html">Utilisateurs</a></li>
<li class="toctree-l2"><a class="reference internal" href="api/workouts.html">Séances</a></li>
2020-12-30 11:12:35 +01:00
</ul>
</li>
2023-06-18 20:45:39 +02:00
<li class="toctree-l1 has-children"><a class="reference internal" href="troubleshooting/index.html">Dépannage</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Dépannage</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="troubleshooting/administrator.html">Administrateur</a></li>
2022-02-05 22:09:17 +01:00
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change log</a></li>
2020-12-30 11:12:35 +01:00
</ul>
</div>
2023-06-18 15:23:33 +02:00
</div><div id="furo-languages" tabindex="0">
<span class="languages-label">
<i class="fa fa-language"></i>
</span>
<div class="languages-list">
<a href="../en/installation.html" hreflang=en lang=en>
English
</a>
<a href="../fr/installation.html" hreflang=fr lang=fr>
Français
</a>
</div>
</div>
</div>
2020-12-30 11:12:35 +01:00
</div>
</aside>
<div class="main">
<div class="content">
<div class="article-container">
<a href="#" class="back-to-top muted-link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
</svg>
<span>Back to top</span>
</a>
<div class="content-icon-container">
<div class="theme-toggle-container theme-toggle-content">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-content-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
<article role="main">
<section id="installation">
2023-06-18 15:23:33 +02:00
<h1>Installation<a class="headerlink" href="#installation" title="Lien permanent vers cette rubrique">#</a></h1>
2023-06-18 20:45:39 +02:00
<p>Cette application est développée en Python (API) et Typescript (client) :</p>
2020-12-30 11:12:35 +01:00
<ul class="simple">
<li><dl class="simple">
2023-06-18 20:45:39 +02:00
<dt>API :</dt><dd><ul>
2020-12-30 11:12:35 +01:00
<li><p>Flask</p></li>
2023-06-18 20:45:39 +02:00
<li><p><a class="reference external" href="https://github.com/tkrajina/gpxpy">gpxpy</a> pour analyser les fichiers gpx</p></li>
<li><p><a class="reference external" href="https://github.com/komoot/staticmap">staticmap</a> pour générer une image de la trace à partir des données du fichier gpx</p></li>
<li><p><a class="reference external" href="https://flask-dramatiq.readthedocs.io/en/latest/">dramatiq</a> pour la file dattente des tâches</p></li>
<li><p><a class="reference external" href="https://docs.authlib.org/en/latest/">Authlib</a> pour le support de lautorisation OAuth 2.0</p></li>
<li><p><a class="reference external" href="https://flask-limiter.readthedocs.io/en/stable">Flask-Limiter</a> pour les limitations daccès à lAPI</p></li>
2020-12-30 11:12:35 +01:00
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
2023-06-18 20:45:39 +02:00
<dt>Client :</dt><dd><ul>
2021-11-03 12:41:23 +01:00
<li><p>Vue3/Vuex</p></li>
2023-06-18 20:45:39 +02:00
<li><p><a class="reference external" href="https://leafletjs.com/">Leaflet</a> pour affciher la carte</p></li>
<li><p><a class="reference external" href="https://www.chartjs.org/">Chart.js</a> pour afficher les graphiques délévation et de vitesse</p></li>
2020-12-30 11:12:35 +01:00
</ul>
</dd>
</dl>
</li>
</ul>
2022-04-09 10:21:57 +02:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Le logo, les icônes de certains sports et celles des icônes météo ont été faites par <a class="reference external" href="https://www.freepik.com/">Freepik</a> sur <a class="reference external" href="https://www.flaticon.com/">www.flaticon.com</a>.</div>
<div class="line">FitTrackee utilise également les icônes de <a class="reference external" href="https://forkaweso.me">Fork Awesome</a>.</div>
2022-04-09 10:21:57 +02:00
</div>
2021-11-06 21:26:02 +01:00
<section id="prerequisites">
2023-06-18 20:45:39 +02:00
<h2>Prérequis<a class="headerlink" href="#prerequisites" title="Lien permanent vers cette rubrique">#</a></h2>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2022-09-18 09:30:10 +02:00
<li><dl class="simple">
2023-06-18 20:45:39 +02:00
<dt>obligatoires</dt><dd><ul>
<li><p>Python 3.8+</p></li>
2023-02-20 09:24:29 +01:00
<li><p>PostgreSQL 11+</p></li>
2022-09-18 09:30:10 +02:00
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
2023-06-21 19:45:47 +02:00
<dt>optionnels</dt><dd><ul>
2023-06-18 20:45:39 +02:00
<li><p>Redis pour la file dattente de tâches (si lenvoi des courriels est activé et pour les demandes dexport de données) et les limitations daccès à lAPI</p></li>
<li><p>Fournisseur SMTP (si lenvoi des courriels est activé)</p></li>
<li><p>Clé dAPI dun <a class="reference external" href="installation.html#weather-data">fournisseur de données météo</a></p></li>
2023-06-24 08:48:15 +02:00
<li><p><a class="reference external" href="https://poetry.eustace.io">Poetry</a> (pour linstallation à partir des sources uniquement)</p></li>
2023-06-18 20:45:39 +02:00
<li><p><a class="reference external" href="https://nodejs.org">Node</a> 16+ et <a class="reference external" href="https://yarnpkg.com">Yarn</a> (pour le développement uniquement)</p></li>
<li><p>Docker et Docker Compose (pour le développement ou lévaluation de lapplication)</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2022-09-18 09:30:10 +02:00
</dd>
</dl>
</li>
</ul>
2020-12-30 11:12:35 +01:00
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-24 08:48:15 +02:00
<div class="line">Si linscription des utilisateurs est activé, il est recommandé de configurer un fournisseur SMTP pour lenvoi des courriels et les demandes dexport de données.</div>
2023-03-05 14:26:31 +01:00
</div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Les étapes suivantes décrivent linstallation sur des systèmes Linux (testée sur Debian et Arch).</div>
<div class="line">Sur dautres systèmes dexploitations, des problèmes peuvent être rencontrés et des adaptations nécessaires.</div>
2020-12-30 11:12:35 +01:00
</div>
</div>
2021-11-06 21:26:02 +01:00
</section>
<section id="environment-variables">
2023-06-18 20:45:39 +02:00
<h2>Variables denvironnement<a class="headerlink" href="#environment-variables" title="Lien permanent vers cette rubrique">#</a></h2>
2020-12-30 11:12:35 +01:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2020-12-30 11:12:35 +01:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Depuis la version 0.4.0 de FitTrackee, le fichier <code class="docutils literal notranslate"><span class="pre">Makefile.custom.config</span></code> est remplacé par le fichier <code class="docutils literal notranslate"><span class="pre">.env</span></code></div>
2020-12-30 11:12:35 +01:00
</div>
</div>
2023-06-18 20:45:39 +02:00
<p>Les variables denvironnements suivantes sont utilisées par lapplication web de <strong>FitTrackee</strong> ou la librairie de gestion de la file dattente des tâches. Elles ne sont pas toutes obligatoires selon la méthode de déploiement.</p>
2020-12-30 11:12:35 +01:00
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-FLASK_APP">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">FLASK_APP</span></span><a class="headerlink" href="#envvar-FLASK_APP" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="line-block">
2023-06-24 08:48:15 +02:00
<div class="line">Nom du module à importer au démarrage de Flask.</div>
2023-06-18 20:45:39 +02:00
<div class="line"><code class="docutils literal notranslate"><span class="pre">FLASK_APP</span></code> doit contenir <code class="docutils literal notranslate"><span class="pre">$(PWD)/fittrackee/__main__.py</span></code> dans le cas de linstallation à partir des sources, sinon <code class="docutils literal notranslate"><span class="pre">fittrackee</span></code>.</div>
2020-12-30 11:12:35 +01:00
</div>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-HOST">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">HOST</span></span><a class="headerlink" href="#envvar-HOST" title="Lien permanent vers cette définition">#</a></dt>
2023-06-24 08:48:15 +02:00
<dd><p>Hôte <strong>FitTrackee</strong>.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
2022-09-19 18:49:25 +02:00
<dd class="field-odd"><p>127.0.0.1</p>
2020-12-30 11:12:35 +01:00
</dd>
</dl>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-PORT">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">PORT</span></span><a class="headerlink" href="#envvar-PORT" title="Lien permanent vers cette définition">#</a></dt>
2023-06-24 08:48:15 +02:00
<dd><p>Port de lapplication web <strong>FitTrackee</strong>.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
2020-12-30 11:12:35 +01:00
<dd class="field-odd"><p>5000</p>
</dd>
</dl>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-APP_SETTINGS">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">APP_SETTINGS</span></span><a class="headerlink" href="#envvar-APP_SETTINGS" title="Lien permanent vers cette définition">#</a></dt>
2023-06-24 08:48:15 +02:00
<dd><p>Configuration de <strong>FitTrackee</strong>.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
2020-12-30 11:12:35 +01:00
<dd class="field-odd"><p>fittrackee.config.ProductionConfig</p>
</dd>
</dl>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-APP_SECRET_KEY">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">APP_SECRET_KEY</span></span><a class="headerlink" href="#envvar-APP_SECRET_KEY" title="Lien permanent vers cette définition">#</a></dt>
2023-06-18 20:45:39 +02:00
<dd><p>clé secrète de <strong>FitTrackee</strong>, doit être initialisé sur un environnement de production.</p>
2022-08-27 16:50:29 +02:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2023-06-24 08:48:15 +02:00
<p>Utiliser une clé secrète forte. Cette clé est utilisée pour la génération des jetons JWT.</p>
2022-08-27 16:50:29 +02:00
</div>
2020-12-30 11:12:35 +01:00
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-APP_WORKERS">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">APP_WORKERS</span></span><a class="headerlink" href="#envvar-APP_WORKERS" title="Lien permanent vers cette définition">#</a></dt>
2023-06-24 08:48:15 +02:00
<dd><p>Nombre de _workers_ lancés par <strong>Gunicorn</strong>.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
2020-12-30 11:12:35 +01:00
<dd class="field-odd"><p>1</p>
</dd>
</dl>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-APP_LOG">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">APP_LOG</span></span><a class="headerlink" href="#envvar-APP_LOG" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Chemin du fichier log</p>
2020-12-30 11:12:35 +01:00
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-UPLOAD_FOLDER">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">UPLOAD_FOLDER</span></span><a class="headerlink" href="#envvar-UPLOAD_FOLDER" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Un <strong>chemin absolu</strong> vers le répertoire dans le répertoire <cite>uploads</cite> sera créé.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">&lt;application_directory&gt;/fittrackee</span></code></p>
2020-12-30 11:12:35 +01:00
</dd>
</dl>
<div class="admonition danger">
<p class="admonition-title">Danger</p>
<div class="line-block">
2023-06-24 08:48:15 +02:00
<div class="line">Dans le cas dune installation avec PyPI, le répertoire sera localisé dans le répertoire de lenvironnement virtuel Python si la variable nest pas initialisée.</div>
2020-12-30 11:12:35 +01:00
</div>
</div>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-DATABASE_URL">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">DATABASE_URL</span></span><a class="headerlink" href="#envvar-DATABASE_URL" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">URL de la base de données avec le nom et le mot de passe de lutilisateur, doit être initialisée sur les environnements de production.</div>
<div class="line">Exemple pour un environnement de développement : <code class="docutils literal notranslate"><span class="pre">postgresql://fittrackee:fittrackee&#64;localhost:5432/fittrackee</span></code></div>
2020-12-30 11:12:35 +01:00
</div>
2022-04-09 10:21:57 +02:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2021-04-06 14:03:42 +02:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Depuis la <a class="reference external" href="https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html#change-3687655465c25a39b968b4f5f6e9170b">version 1.4+ de SQLAlchemy</a>, lURL doit commencé avec <cite>postgresql://</cite>.</div>
2021-04-06 14:03:42 +02:00
</div>
</div>
2020-12-30 11:12:35 +01:00
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-DATABASE_DISABLE_POOLING">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">DATABASE_DISABLE_POOLING</span></span><a class="headerlink" href="#envvar-DATABASE_DISABLE_POOLING" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Désactiver le <em>pooling</em> si nécessaire (dans le cas du démarrage direct avec le point dentrée de <strong>FitTrackee</strong> et non avec <strong>Gunicorn</strong>), cf. la <a class="reference external" href="https://docs.sqlalchemy.org/en/13/core/pooling.html#using-connection-pools-with-multiprocessing-or-os-fork">documentation de SqlAlchemy</a>.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
2020-12-30 11:12:35 +01:00
</dd>
</dl>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-UI_URL">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">UI_URL</span></span><a class="headerlink" href="#envvar-UI_URL" title="Lien permanent vers cette définition">#</a></dt>
2023-06-18 20:45:39 +02:00
<dd><p>URL de <strong>FitTrackee</strong>, nécessaire pour les liens dans les courriels.</p>
2020-12-30 11:12:35 +01:00
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-EMAIL_URL">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">EMAIL_URL</span></span><a class="headerlink" href="#envvar-EMAIL_URL" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.3.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>URL du serveur denvoi des courriels avec les informations de connexion, cf. <a class="reference external" href="installation.html#emails">Courriels</a>.</p>
2022-04-24 13:17:38 +02:00
<div class="versionchanged">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.6.5.</span></p>
2022-04-24 13:17:38 +02:00
</div>
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p>chaine de caractère vide</p>
2022-04-24 13:17:38 +02:00
</dd>
</dl>
<div class="admonition danger">
<p class="admonition-title">Danger</p>
2023-06-18 20:45:39 +02:00
<p>Si lURL du serveur est vide, lenvoi des courriels sera désactivé.</p>
2022-04-24 13:17:38 +02:00
</div>
2021-11-14 22:12:29 +01:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2023-06-18 20:45:39 +02:00
<p>Si lURL du serveur est invalide, lenvoi des courriels sera désactivé.</p>
2021-11-14 22:12:29 +01:00
</div>
2020-12-30 11:12:35 +01:00
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-SENDER_EMAIL">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">SENDER_EMAIL</span></span><a class="headerlink" href="#envvar-SENDER_EMAIL" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.3.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Adresse électronique de lexpéditeur <strong>FitTrackee</strong>.</p>
2020-12-30 11:12:35 +01:00
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-REDIS_URL">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">REDIS_URL</span></span><a class="headerlink" href="#envvar-REDIS_URL" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.3.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Instance Redis utilisée par <strong>Dramatiq</strong> et <strong>Flask-Limiter</strong>.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p>instance locale Redis (<code class="docutils literal notranslate"><span class="pre">redis://</span></code>)</p>
2020-12-30 11:12:35 +01:00
</dd>
</dl>
</dd></dl>
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-WORKERS_PROCESSES">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">WORKERS_PROCESSES</span></span><a class="headerlink" href="#envvar-WORKERS_PROCESSES" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.3.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Nombre de processus utilisés par <strong>Dramatiq</strong>.</p>
2020-12-30 11:12:35 +01:00
</dd></dl>
2022-09-18 09:30:10 +02:00
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-API_RATE_LIMITS">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">API_RATE_LIMITS</span></span><a class="headerlink" href="#envvar-API_RATE_LIMITS" title="Lien permanent vers cette définition">#</a></dt>
2022-09-18 09:30:10 +02:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.7.0.</span></p>
2022-09-18 09:30:10 +02:00
</div>
2023-06-18 20:45:39 +02:00
<p>Limite daccès à lAPI, cf. <a class="reference external" href="installation.html#api-rate-limits">Limitation daccès à lAPI</a>.</p>
2022-09-18 09:30:10 +02:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">300</span> <span class="pre">per</span> <span class="pre">5</span> <span class="pre">minutes</span></code></p>
2022-09-18 09:30:10 +02:00
</dd>
</dl>
</dd></dl>
2020-12-30 11:12:35 +01:00
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-TILE_SERVER_URL">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">TILE_SERVER_URL</span></span><a class="headerlink" href="#envvar-TILE_SERVER_URL" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2021-07-14 21:11:42 +02:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">URl du serveur de tuiles (avec la clé de lAPI si nécessaire), cf. <a class="reference external" href="installation.html#map-tile-server">Serveur de tuiles</a>.</div>
<div class="line">Depuis la version <strong>0.4.9</strong>, il est également utiliser pour générer les images statiques des cartes (pour garder le serveur par défaut cf. <a class="reference external" href="installation.html#envvar-DEFAULT_STATICMAP">DEFAULT_STATICMAP</a>)</div>
2021-07-14 21:11:42 +02:00
</div>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png</span></code></p>
2020-12-30 11:12:35 +01:00
</dd>
</dl>
</dd></dl>
2022-07-13 13:02:12 +02:00
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-STATICMAP_SUBDOMAINS">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">STATICMAP_SUBDOMAINS</span></span><a class="headerlink" href="#envvar-STATICMAP_SUBDOMAINS" title="Lien permanent vers cette définition">#</a></dt>
2022-07-13 13:02:12 +02:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.6.10.</span></p>
2022-07-13 13:02:12 +02:00
</div>
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Certains serveurs de tuiles nécessitent un sous-domaine, df. <a class="reference external" href="installation.html#map-tile-server">Serveur de tuiles</a>.</div>
<div class="line">Par exemple: « a,b,c » pour OSM France.</div>
2022-07-13 13:02:12 +02:00
</div>
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p>chaine de caractère vide</p>
2022-07-13 13:02:12 +02:00
</dd>
</dl>
</dd></dl>
2020-12-30 11:12:35 +01:00
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-MAP_ATTRIBUTION">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">MAP_ATTRIBUTION</span></span><a class="headerlink" href="#envvar-MAP_ATTRIBUTION" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Attribution de la carte (si une autre serveur de tuile est utilisé), cf. <a class="reference external" href="installation.html#map-tile-server">Serveur de tuiles</a>.</p>
2020-12-30 11:12:35 +01:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">&amp;copy;</span> <span class="pre">&lt;a</span> <span class="pre">href=&quot;http://www.openstreetmap.org/copyright&quot;</span> <span class="pre">target=&quot;_blank&quot;</span> <span class="pre">rel=&quot;noopener</span> <span class="pre">noreferrer&quot;&gt;OpenStreetMap&lt;/a&gt;</span> <span class="pre">contributors</span></code></p>
2020-12-30 11:12:35 +01:00
</dd>
</dl>
</dd></dl>
2021-07-16 19:33:32 +02:00
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-DEFAULT_STATICMAP">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">DEFAULT_STATICMAP</span></span><a class="headerlink" href="#envvar-DEFAULT_STATICMAP" title="Lien permanent vers cette définition">#</a></dt>
2021-07-16 19:33:32 +02:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.9.</span></p>
2021-07-16 19:33:32 +02:00
</div>
2022-07-13 13:02:12 +02:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Si <code class="docutils literal notranslate"><span class="pre">True</span></code>, le serveur de tuile par défaut est conservé pour générer les images statiques de cartes (serveur de tuiles Komoot.de).</div>
<div class="line">Sinon, le serveur de tuiles configuré dans <a class="reference external" href="installation.html#envvar-TILE_SERVER_URL">TILE_SERVER_URL</a> sera utilisé.</div>
2022-07-13 13:02:12 +02:00
</div>
<div class="versionchanged">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.6.10.</span></p>
2022-07-13 13:02:12 +02:00
</div>
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Cette variable est maintenant insensible à la casse.</div>
<div class="line">Si <code class="docutils literal notranslate"><span class="pre">False</span></code>, selon le serveur de tuile, les <a class="reference external" href="installation.html#envvar-STATICMAP_SUBDOMAINS">sous-domaines</a> peuvent être obligatoires.</div>
2022-07-13 13:02:12 +02:00
</div>
2021-07-16 19:33:32 +02:00
<dl class="field-list simple">
2023-06-18 20:45:39 +02:00
<dt class="field-odd">défaut<span class="colon">:</span></dt>
2021-07-16 19:33:32 +02:00
<dd class="field-odd"><p>False</p>
</dd>
</dl>
</dd></dl>
2020-12-30 11:12:35 +01:00
<dl class="std envvar">
2021-11-06 21:26:02 +01:00
<dt class="sig sig-object std" id="envvar-WEATHER_API_KEY">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">WEATHER_API_KEY</span></span><a class="headerlink" href="#envvar-WEATHER_API_KEY" title="Lien permanent vers cette définition">#</a></dt>
2020-12-30 11:12:35 +01:00
<dd><div class="versionchanged">
2023-06-18 20:45:39 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.4.0: </span>⚠️ remplace <code class="docutils literal notranslate"><span class="pre">WEATHER_API</span></code></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Clé dAPI du fournisseur de données météo (non obligatoire), cf. <code class="docutils literal notranslate"><span class="pre">WEATHER_API_PROVIDER</span></code>.</p>
2022-12-31 18:38:44 +01:00
</dd></dl>
<dl class="std envvar">
<dt class="sig sig-object std" id="envvar-WEATHER_API_PROVIDER">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">WEATHER_API_PROVIDER</span> <span class="pre">🆕</span></span><a class="headerlink" href="#envvar-WEATHER_API_PROVIDER" title="Lien permanent vers cette définition">#</a></dt>
2022-12-31 18:38:44 +01:00
<dd><div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.7.11.</span></p>
2022-12-31 18:38:44 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Fournisseur de données météo (non obligatoire), cf <a class="reference external" href="installation.html#weather-data">Données météo</a>.</p>
2020-12-30 11:12:35 +01:00
</dd></dl>
<dl class="std envvar">
2021-11-06 22:18:38 +01:00
<dt class="sig sig-object std" id="envvar-VUE_APP_API_URL">
2023-06-18 15:23:33 +02:00
<span class="sig-name descname"><span class="pre">VUE_APP_API_URL</span></span><a class="headerlink" href="#envvar-VUE_APP_API_URL" title="Lien permanent vers cette définition">#</a></dt>
2023-06-18 20:45:39 +02:00
<dd><p>URL de lAPI <strong>FitTrackee</strong>, uniquement pour les environnements de développement.</p>
2020-12-30 11:12:35 +01:00
</dd></dl>
2021-11-06 21:26:02 +01:00
<section id="emails">
2023-06-18 20:45:39 +02:00
<h3>Courriels<a class="headerlink" href="#emails" title="Lien permanent vers cette rubrique">#</a></h3>
2020-12-30 11:12:35 +01:00
<div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.3.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Pour lenvoi des courriels, une valeur valide pour la variable <code class="docutils literal notranslate"><span class="pre">EMAIL_URL</span></code> doit être fourni :</p>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>avec un SMTP server sans chiffrement : <code class="docutils literal notranslate"><span class="pre">smtp://username:password&#64;smtp.example.com:25</span></code></p></li>
2023-06-24 08:48:15 +02:00
<li><p>avec SSL : <code class="docutils literal notranslate"><span class="pre">smtp://username:password&#64;smtp.example.com:465/?ssl=True</span></code></p></li>
<li><p>avec STARTTLS : <code class="docutils literal notranslate"><span class="pre">smtp://username:password&#64;smtp.example.com:587/?tls=True</span></code></p></li>
2020-12-30 11:12:35 +01:00
</ul>
2022-04-09 10:21:57 +02:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2022-04-09 10:21:57 +02:00
<div class="line-block">
2023-06-21 19:45:47 +02:00
<div class="line">Si lURL du serveur est invalide, lenvoi des courriels sera désactivé.</div>
<div class="line">Sending emails with Office365 may not work if SMTP auth is disabled.</div>
2022-04-09 10:21:57 +02:00
</div>
</div>
2022-04-24 13:17:38 +02:00
<div class="versionchanged">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.5.3.</span></p>
</div>
<div class="line-block">
2023-06-24 08:48:15 +02:00
<div class="line">Les informations didentification peuvent être omises : <code class="docutils literal notranslate"><span class="pre">smtp://smtp.example.com:25</span></code>.</div>
2023-06-18 20:45:39 +02:00
<div class="line">Si <code class="docutils literal notranslate"><span class="pre">:&lt;port&gt;</span></code> est omis, the port par défaut est 25.</div>
</div>
2022-04-09 10:21:57 +02:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2022-04-09 10:21:57 +02:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Depuis la version 0.6.0, les comptes nouvellement créés doivent être confirmés (un courriel contenant des instructions de confirmation est envoyé après linscription).</div>
2022-04-09 10:21:57 +02:00
</div>
</div>
2023-06-18 20:45:39 +02:00
<p>Les courriels envoyés par FitTrackee sont :</p>
2022-04-09 10:21:57 +02:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>instructions pour la confirmation du compte</p></li>
<li><p>demande de réinitialisation du mot de passe</p></li>
<li><p>changement dadresse électronique (vers lancienne et la nouvelle adresse)</p></li>
<li><p>changement de mot de passe</p></li>
2023-06-21 19:45:47 +02:00
<li><p>notification lorsquune archive dexport de données est prête à être téléchargée (<em>ajouté dans la version 0.7.13</em>)</p></li>
2022-04-09 10:21:57 +02:00
</ul>
2022-04-24 13:17:38 +02:00
<div class="versionchanged">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.6.5.</span></p>
2022-04-24 13:17:38 +02:00
</div>
2023-06-21 19:45:47 +02:00
<p>Dans le cas des instance avec un seul utilisateur, il est possible de désactiver lenvoi de courriels en laissant la variable <code class="docutils literal notranslate"><span class="pre">EMAIL_URL</span></code> vide (dans ce cas il nest pas nécessaire de lancer les <em>workers</em> de dramatiq).</p>
2023-06-18 20:45:39 +02:00
<p>Une <a class="reference external" href="cli.html#ftcli-users-update">interface de ligne de commande (CLI)</a> est disponible pour activer les comptes, modifier ladresse électronique et le mot de passe et gérer les demandes dexports de données.</p>
2021-11-06 21:26:02 +01:00
</section>
<section id="map-tile-server">
2023-06-18 20:45:39 +02:00
<h3>Serveur de tuiles<a class="headerlink" href="#map-tile-server" title="Lien permanent vers cette rubrique">#</a></h3>
2020-12-30 11:12:35 +01:00
<div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.0.</span></p>
2020-12-30 11:12:35 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Le serveur de tuiles par défaut est maintenant le serveur standard d”<strong>OpenStreetMap</strong> (si les variables denvironnements ne sont pas initialisées). Le serveur de tuile peut être changé en modifiant les variables <code class="docutils literal notranslate"><span class="pre">TILE_SERVER_URL</span></code> et <code class="docutils literal notranslate"><span class="pre">MAP_ATTRIBUTION</span></code> (<a class="reference external" href="https://wiki.openstreetmap.org/wiki/Raster_tile_providers">liste des serveurs de tuiles</a>).</p>
<p>Pour conserver <strong>ThunderForest Outdoors</strong>, la configuration est :</p>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p><code class="docutils literal notranslate"><span class="pre">TILE_SERVER_URL=https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=XXXX</span></code><strong>XXXX</strong> est la clé dAPI de <strong>ThunderForest</strong></p></li>
2020-12-30 11:12:35 +01:00
<li><p><code class="docutils literal notranslate"><span class="pre">MAP_ATTRIBUTION=&amp;copy;</span> <span class="pre">&lt;a</span> <span class="pre">href=&quot;http://www.thunderforest.com/&quot;&gt;Thunderforest&lt;/a&gt;,</span> <span class="pre">&amp;copy;</span> <span class="pre">&lt;a</span> <span class="pre">href=&quot;http://www.openstreetmap.org/copyright&quot;&gt;OpenStreetMap&lt;/a&gt;</span> <span class="pre">contributors</span></code></p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Vérifier les conditions dutilisation du fournisseur de tuiles pour lattribution des cartes.</div>
2020-12-30 11:12:35 +01:00
</div>
</div>
2022-07-13 13:02:12 +02:00
<div class="versionchanged">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.6.10.</span></p>
2022-07-13 13:02:12 +02:00
</div>
2023-06-18 20:45:39 +02:00
<p>Depuis que le serveur de tuiles peut être utilisé pour la génération des images statiques de cartes, certains serveurs nécessitent un sous-domaine.</p>
2023-06-21 19:45:47 +02:00
<p>Par exemple, pour configurer le serveur d'OSM France, les valeurs attendues sont :</p>
2022-07-13 13:02:12 +02:00
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">TILE_SERVER_URL=https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png</span></code></p></li>
2022-07-13 15:21:01 +02:00
<li><p><code class="docutils literal notranslate"><span class="pre">MAP_ATTRIBUTION='fond</span> <span class="pre">de</span> <span class="pre">carte</span> <span class="pre">par</span> <span class="pre">&lt;a</span> <span class="pre">href=&quot;http://www.openstreetmap.fr/mentions-legales/&quot;</span> <span class="pre">target=&quot;_blank&quot;</span> <span class="pre">rel=&quot;nofollow</span> <span class="pre">noopener&quot;&gt;OpenStreetMap</span> <span class="pre">France&lt;/a&gt;,</span> <span class="pre">sous&amp;nbsp;&lt;a</span> <span class="pre">href=&quot;http://creativecommons.org/licenses/by-sa/2.0/fr/&quot;</span> <span class="pre">target=&quot;_blank&quot;</span> <span class="pre">rel=&quot;nofollow</span> <span class="pre">noopener&quot;&gt;licence</span> <span class="pre">CC</span> <span class="pre">BY-SA&lt;/a&gt;'</span></code></p></li>
2022-07-13 13:02:12 +02:00
<li><p><code class="docutils literal notranslate"><span class="pre">STATICMAP_SUBDOMAINS=a,b,c</span></code></p></li>
</ul>
2023-06-18 20:45:39 +02:00
<p>Le sous-domaine sera choisi de manière aléatoire.</p>
2021-11-06 21:26:02 +01:00
</section>
2022-09-18 09:30:10 +02:00
<section id="api-rate-limits">
2023-06-18 20:45:39 +02:00
<h3>Limitation daccès à lAPI<a class="headerlink" href="#api-rate-limits" title="Lien permanent vers cette rubrique">#</a></h3>
2022-09-18 09:30:10 +02:00
<div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.7.0.</span></p>
2022-09-18 09:30:10 +02:00
</div>
<div class="line-block">
2023-06-21 19:45:47 +02:00
<div class="line">La limitation daccès à lAPI est gérée par <a class="reference external" href="https://flask-limiter.readthedocs.io/en/stable">Flask-Limiter</a>, et basé sur ladresse IP avec une stratégie de période fixe.</div>
2023-06-18 20:45:39 +02:00
<div class="line">Pour activer la limitation daccès, <strong>Redis</strong> doit être accessible.</div>
2022-09-18 09:30:10 +02:00
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Si aucune instance Redis nest disponible, FitTrackee pourra tout de même démarrer.</div>
2022-09-18 09:30:10 +02:00
</div>
</div>
<div class="line-block">
2023-06-21 19:45:47 +02:00
<div class="line">Tous les points daccès sont soumis à des limitations daccès sauf les points servant des <em>assets</em>.</div>
2023-06-18 20:45:39 +02:00
<div class="line">Les limites peuvent être modifiées en configurant la variable <code class="docutils literal notranslate"><span class="pre">API_RATE_LIMITS</span></code> (cf. la <a class="reference external" href="https://flask-limiter.readthedocs.io/en/stable/configuration.html#rate-limit-string-notation">documentation Flask-Limiter sur la notation</a>).</div>
<div class="line">Les limites doivent être séparées par des virgules, par exemple :</div>
2022-09-18 09:30:10 +02:00
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">API_RATE_LIMITS</span><span class="o">=</span><span class="s2">&quot;200 per day, 50 per hour&quot;</span>
</pre></div>
</div>
2023-06-21 19:45:47 +02:00
<p><strong>Flask-Limiter</strong> fournit une <a class="reference external" href="https://flask-limiter.readthedocs.io/en/stable/cli.html">Interface de lignes de commande</a> à des fins de maintenance et de diagnostic.</p>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>flask<span class="w"> </span>limiter
Usage:<span class="w"> </span>flask<span class="w"> </span>limiter<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span><span class="w"> </span>COMMAND<span class="w"> </span><span class="o">[</span>ARGS<span class="o">]</span>...
2022-09-18 09:30:10 +02:00
2023-02-16 11:18:50 +01:00
<span class="w"> </span>Flask-Limiter<span class="w"> </span>maintenance<span class="w"> </span><span class="p">&amp;</span><span class="w"> </span>utility<span class="w"> </span>commmands
2022-09-18 09:30:10 +02:00
Options:
2023-02-16 11:18:50 +01:00
<span class="w"> </span>--help<span class="w"> </span>Show<span class="w"> </span>this<span class="w"> </span>message<span class="w"> </span>and<span class="w"> </span>exit.
2022-09-18 09:30:10 +02:00
Commands:
2023-02-16 11:18:50 +01:00
<span class="w"> </span>clear<span class="w"> </span>Clear<span class="w"> </span>limits<span class="w"> </span><span class="k">for</span><span class="w"> </span>a<span class="w"> </span>specific<span class="w"> </span>key
<span class="w"> </span>config<span class="w"> </span>View<span class="w"> </span>the<span class="w"> </span>extension<span class="w"> </span>configuration
<span class="w"> </span>limits<span class="w"> </span>Enumerate<span class="w"> </span>details<span class="w"> </span>about<span class="w"> </span>all<span class="w"> </span>routes<span class="w"> </span>with<span class="w"> </span>rate<span class="w"> </span>limits
2022-09-18 09:30:10 +02:00
</pre></div>
</div>
</section>
2022-12-31 18:38:44 +01:00
<section id="weather-data">
2023-06-18 20:45:39 +02:00
<h3>Données météo<a class="headerlink" href="#weather-data" title="Lien permanent vers cette rubrique">#</a></h3>
2022-12-31 18:38:44 +01:00
<div class="versionchanged">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.7.11.</span></p>
2022-12-31 18:38:44 +01:00
</div>
2023-06-18 20:45:39 +02:00
<p>Les fournisseurs de données météo suivants sont pris en charge par <strong>FitTrackee</strong> :</p>
2022-12-31 18:38:44 +01:00
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p><a class="reference external" href="https://www.visualcrossing.com">Visual Crossing</a> (<strong>note</strong> : les données historiques sont fournies sur une période dune heure)</p></li>
2022-12-31 18:38:44 +01:00
</ul>
2023-06-18 20:45:39 +02:00
<p>Pour configurer un fournisseur de données météo, initialiser les variables denvironnement suivantes :</p>
2022-12-31 18:38:44 +01:00
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p><code class="docutils literal notranslate"><span class="pre">WEATHER_API_KEY</span></code> : clé dAPI correspondant au fournisseur de données météo</p></li>
2022-12-31 18:38:44 +01:00
</ul>
2023-04-12 17:32:08 +02:00
<div class="versionchanged">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified changed">Modifié dans la version 0.7.15.</span></p>
2023-04-12 17:32:08 +02:00
</div>
2023-06-18 20:45:39 +02:00
<p>Le support de <strong>DarkSky</strong> est interrompu, depuis larrêt du service le 31 Mars 2023.</p>
2022-12-31 18:38:44 +01:00
</section>
2021-11-06 21:26:02 +01:00
</section>
2022-09-18 09:30:10 +02:00
<section id="id2">
2023-06-18 15:23:33 +02:00
<h2>Installation<a class="headerlink" href="#id2" title="Lien permanent vers cette rubrique">#</a></h2>
2022-02-05 22:09:17 +01:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2022-02-05 22:09:17 +01:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Remarque : FitTrackee est en cours de développement, certaines fonctionnalités peuvent être instables.</div>
2022-02-05 22:09:17 +01:00
</div>
</div>
2021-11-06 21:26:02 +01:00
<section id="from-pypi">
2023-06-18 20:45:39 +02:00
<h3>A partir de PyPI<a class="headerlink" href="#from-pypi" title="Lien permanent vers cette rubrique">#</a></h3>
2020-12-30 11:12:35 +01:00
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-24 08:48:15 +02:00
<div class="line">Méthode recommandée en production.</div>
2020-12-30 11:12:35 +01:00
</div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Créer et activer lenvironnement virtuel</p></li>
<li><p>Installer <strong>FitTrackee</strong> à partir de pip</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>fittrackee
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Créer la base de données <code class="docutils literal notranslate"><span class="pre">fittrackee</span></code></p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-06-18 20:45:39 +02:00
<p>Exemple :</p>
2023-02-16 11:18:50 +01:00
<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="k">USER</span><span class="w"> </span><span class="n">fittrackee</span><span class="w"> </span><span class="k">WITH</span><span class="w"> </span><span class="n">PASSWORD</span><span class="w"> </span><span class="s1">&#39;&lt;PASSWORD&gt;&#39;</span><span class="p">;</span>
<span class="k">CREATE</span><span class="w"> </span><span class="k">SCHEMA</span><span class="w"> </span><span class="n">fittrackee</span><span class="w"> </span><span class="k">AUTHORIZATION</span><span class="w"> </span><span class="n">fittrackee</span><span class="p">;</span>
<span class="k">CREATE</span><span class="w"> </span><span class="k">DATABASE</span><span class="w"> </span><span class="n">fittrackee</span><span class="w"> </span><span class="k">OWNER</span><span class="w"> </span><span class="n">fittrackee</span><span class="p">;</span>
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
2022-10-30 08:50:59 +01:00
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">cf. <a class="reference external" href="https://www.postgresql.org/docs/15/ddl-schemas.html">documentation</a> PostgreSQL pour les schémas et privilèges.</div>
2022-10-30 08:50:59 +01:00
</div>
</div>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Initialiser les variables denvironnement, cf. <a class="reference external" href="installation.html#environment-variables">Variables denvironnement</a></p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-06-24 08:48:15 +02:00
<p>Par exemple, copier et coller le fichier <code class="docutils literal notranslate"><span class="pre">.env</span></code> à partir de <code class="docutils literal notranslate"><span class="pre">.env.example</span></code> et activer le fichier.</p>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>nano<span class="w"> </span>.env
$<span class="w"> </span><span class="nb">source</span><span class="w"> </span>.env
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Initialiser le schéma de la base de données</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ftcli<span class="w"> </span>db<span class="w"> </span>upgrade
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Démarrer lapplication</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>fittrackee
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Démarrer les <em>workers</em> de la file dattente des tâches si lenvoi des courriels est activé, avec linterface de ligne de commandes de flask-dramatiq :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>flask<span class="w"> </span>worker<span class="w"> </span>--processes<span class="w"> </span><span class="m">2</span>
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Pour démarrer lapplication et les <em>workers</em> avec le service <strong>systemd</strong>, cf. <a class="reference external" href="installation.html#deployment">Déploiement</a></div>
2020-12-30 11:12:35 +01:00
</div>
</div>
2022-02-13 09:52:34 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Ouvrir lURL <a class="reference external" href="http://localhost:5000">http://localhost:5000</a> avec un navigateur et sinscrire</p></li>
<li><p>Pour donner les droits dadministration au compte nouvellement créé utiliser la ligne de commande suivante :</p></li>
2022-02-13 09:52:34 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ftcli<span class="w"> </span>users<span class="w"> </span>update<span class="w"> </span>&lt;username&gt;<span class="w"> </span>--set-admin<span class="w"> </span><span class="nb">true</span>
2022-02-13 09:52:34 +01:00
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Si le compte de lutilisateur est inactif, il sera alors activée.</p>
</div>
2021-11-06 21:26:02 +01:00
</section>
<section id="from-sources">
2023-06-18 20:45:39 +02:00
<h3>A partir des sources<a class="headerlink" href="#from-sources" title="Lien permanent vers cette rubrique">#</a></h3>
2020-12-30 11:12:35 +01:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2020-12-30 11:12:35 +01:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Depuis la version 0.2.1 de FitTrackee, linstallation des paquets Python nécessite Poetry.</div>
<div class="line">Pour plus dinformation, voir la <a class="reference external" href="https://python-poetry.org/docs/#installation">documentation de Poetry</a></div>
2020-12-30 11:12:35 +01:00
</div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<div class="line-block">
2023-06-21 19:45:47 +02:00
<div class="line">Pour conserver lenvironnement virtuel dans le répertoire du projet, mettre à jour la configuration de Poetry.</div>
</div>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>poetry<span class="w"> </span>config<span class="w"> </span>virtualenvs.in-project<span class="w"> </span><span class="nb">true</span>
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
</div>
2021-11-06 21:26:02 +01:00
<section id="dev-environment">
2023-06-18 20:45:39 +02:00
<h4>Environnements de développement<a class="headerlink" href="#dev-environment" title="Lien permanent vers cette rubrique">#</a></h4>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Cloner ce dépôt :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/SamR1/FitTrackee.git
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>FitTrackee
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Créer le fichier <strong>.env</strong> à partir de lexemple et le mettre à jour (cf. <a class="reference external" href="installation.html#environment-variables">Variables denvironnement</a>).</p></li>
<li><p>Installer lenvironnement virtuel Python, Vue et tous les paquets nécessaires et initialiser la base de données :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>install-dev
$<span class="w"> </span>make<span class="w"> </span>install-db
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Démarrer le serveur et le client :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>serve
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Démarrer les <em>workers</em> dramatiq :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>run-workers
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
2022-02-13 09:52:34 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Ouvrir lURL <a class="reference external" href="http://localhost:3000">http://localhost:3000</a> avec un navigateur et sinscrire</p></li>
<li><p>Pour donner les droits dadministration au compte nouvellement créé utiliser la ligne de commande suivante :</p></li>
2022-02-13 09:52:34 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>user-set-admin<span class="w"> </span><span class="nv">USERNAME</span><span class="o">=</span>&lt;username&gt;
2022-02-13 09:52:34 +01:00
</pre></div>
</div>
2022-03-27 15:11:12 +02:00
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Si le compte de lutilisateur est inactif, il sera alors activée.</p>
2022-03-27 15:11:12 +02:00
</div>
2021-11-06 21:26:02 +01:00
</section>
<section id="production-environment">
2023-06-18 20:45:39 +02:00
<h4>Environnements de production<a class="headerlink" href="#production-environment" title="Lien permanent vers cette rubrique">#</a></h4>
2020-12-30 11:12:35 +01:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2020-12-30 11:12:35 +01:00
<div class="line-block">
<div class="line">Note that FitTrackee is under heavy development, some features may be unstable.</div>
</div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Télécharger la dernière version (à ce jour, la version v0.7.17) :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-06-03 15:37:15 +02:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>wget<span class="w"> </span>https://github.com/SamR1/FitTrackee/archive/v0.7.17.tar.gz
$<span class="w"> </span>tar<span class="w"> </span>-xzf<span class="w"> </span>v0.7.17.tar.gz
$<span class="w"> </span>mv<span class="w"> </span>FitTrackee-0.7.17<span class="w"> </span>FitTrackee
2023-02-16 11:18:50 +01:00
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>FitTrackee
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Créer le fichier <strong>.env</strong> à partir de lexemple et le mettre à jour (cf. <a class="reference external" href="installation.html#environment-variables">Variables denvironnement</a>).</p></li>
2023-06-24 08:48:15 +02:00
<li><p>Installer lenvironnement virtuel Python et tous les paquets nécessaires :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>install-python
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Initialiser la base de données (<strong>après avoir mis à jour</strong> <code class="docutils literal notranslate"><span class="pre">db/create.sql</span></code> <strong>pour changer les informations de connexion à la base de données</strong>) :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>install-db
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Démarrer le serveur et les <em>workers</em> dramatiq :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>run
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
2022-04-24 13:17:38 +02:00
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Si lenvoi des courriels est désactivé : <code class="docutils literal notranslate"><span class="pre">$</span> <span class="pre">make</span> <span class="pre">run-server</span></code></p>
2022-04-24 13:17:38 +02:00
</div>
2022-02-13 09:52:34 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Ouvrir lURL <a class="reference external" href="http://localhost:5000">http://localhost:5000</a> avec un navigateur et sinscrire</p></li>
<li><p>Pour donner les droits dadministration au compte nouvellement créé utiliser la ligne de commande suivante :</p></li>
2022-02-13 09:52:34 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>user-set-admin<span class="w"> </span><span class="nv">USERNAME</span><span class="o">=</span>&lt;username&gt;
2022-02-13 09:52:34 +01:00
</pre></div>
</div>
2022-03-27 15:11:12 +02:00
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Si le compte de lutilisateur est inactif, il sera alors activée.</p>
2022-03-27 15:11:12 +02:00
</div>
2021-11-06 21:26:02 +01:00
</section>
</section>
2022-02-05 22:09:17 +01:00
</section>
<section id="upgrade">
2023-06-18 20:45:39 +02:00
<h2>Mise à jour<a class="headerlink" href="#upgrade" title="Lien permanent vers cette rubrique">#</a></h2>
2020-12-30 11:12:35 +01:00
<div class="admonition warning">
2023-06-18 15:23:33 +02:00
<p class="admonition-title">Avertissement</p>
2020-12-30 11:12:35 +01:00
<div class="line-block">
2023-06-18 20:45:39 +02:00
<div class="line">Avant de procéder à la mise à jour, faire une sauvegarde de lensemble des données :</div>
2020-12-30 11:12:35 +01:00
<div class="line">- database (with <a class="reference external" href="https://www.postgresql.org/docs/11/app-pgdump.html">pg_dump</a> for instance)</div>
<div class="line">- upload directory (see <a class="reference external" href="installation.html#environment-variables">Environment variables</a>)</div>
</div>
</div>
2022-09-18 09:30:10 +02:00
<section id="id3">
2023-06-18 20:45:39 +02:00
<h3>A partir de PyPI<a class="headerlink" href="#id3" title="Lien permanent vers cette rubrique">#</a></h3>
2022-02-05 22:09:17 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Stopper lapplication et activer lenvironnement virtuel</p></li>
<li><p>Mettre à jour avec pip</p></li>
2022-02-05 22:09:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-U<span class="w"> </span>fittrackee
2022-02-05 22:09:17 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Mettre à jour les variables denvironnements si nécessaire et les activer</p></li>
2022-02-05 22:09:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>nano<span class="w"> </span>.env
$<span class="w"> </span><span class="nb">source</span><span class="w"> </span>.env
2022-02-05 22:09:17 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Mettre à jour la base de données si nécessaire (voir le journal des changements pour les migrations) :</p></li>
2022-02-05 22:09:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ftcli<span class="w"> </span>db<span class="w"> </span>upgrade
2022-02-05 22:09:17 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Redémarrer lapplication et les <em>workers</em> de la file dattente des tâches (si lenvoi des courriels est activé).</p></li>
2022-02-05 22:09:17 +01:00
</ul>
</section>
2021-11-06 21:26:02 +01:00
<section id="id4">
2023-06-18 20:45:39 +02:00
<h3>A partir des sources<a class="headerlink" href="#id4" title="Lien permanent vers cette rubrique">#</a></h3>
2022-09-18 09:30:10 +02:00
<section id="id5">
2023-06-18 20:45:39 +02:00
<h4>Environnements de développement<a class="headerlink" href="#id5" title="Lien permanent vers cette rubrique">#</a></h4>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Arrêter lapplication et récupérer les derniers changements du dépôt :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>git<span class="w"> </span>pull
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Mettre à jour le fichier <strong>.env</strong> si nécessaire (cf. <a class="reference external" href="installation.html#environment-variables">Variables denvironnement</a>).</p></li>
2023-06-24 08:48:15 +02:00
<li><p>Mettre à jour les paquets :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>install-dev
2022-02-05 22:09:17 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Mettre à jour la base de données si nécessaire (voir le journal des changements pour les migrations) :</p></li>
2022-02-05 22:09:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>upgrade-db
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Redémarrer le serveur :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>serve
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Démarrer les <em>workers</em> dramatiq :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>run-workers
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
2021-11-06 21:26:02 +01:00
</section>
<section id="prod-environment">
2023-06-18 20:45:39 +02:00
<h4>Environnement de production<a class="headerlink" href="#prod-environment" title="Lien permanent vers cette rubrique">#</a></h4>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Arrêter lapplication</p></li>
<li><p>Changer pour le répertoire dans lequel FitTrackee est localisé</p></li>
<li><p>Télécharger la dernière version (à ce jour, la version v0.7.17) et écraser les fichiers existants :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-06-03 15:37:15 +02:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>wget<span class="w"> </span>https://github.com/SamR1/FitTrackee/archive/v0.7.17.tar.gz
$<span class="w"> </span>tar<span class="w"> </span>-xzf<span class="w"> </span>v0.7.17.tar.gz
$<span class="w"> </span>cp<span class="w"> </span>-R<span class="w"> </span>FitTrackee-0.7.17/*<span class="w"> </span>FitTrackee/
2023-02-16 11:18:50 +01:00
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>FitTrackee
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Mettre à jour le fichier <strong>.env</strong> si nécessaire (cf. <a class="reference external" href="installation.html#environment-variables">Variables denvironnement</a>).</p></li>
2023-06-24 08:48:15 +02:00
<li><p>Mettre à jour les paquets :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>install-dev
2022-02-05 22:09:17 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Mettre à jour la base de données si nécessaire (voir le journal des changements pour les migrations) :</p></li>
2022-02-05 22:09:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>upgrade-db
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Redémarrer le serveur et les <em>workers</em> dramatiq :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>run
2020-12-30 11:12:35 +01:00
</pre></div>
</div>
2022-04-24 13:17:38 +02:00
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Si lenvoi des courriels est désactivé : <code class="docutils literal notranslate"><span class="pre">$</span> <span class="pre">make</span> <span class="pre">run-server</span></code></p>
2022-04-24 13:17:38 +02:00
</div>
2021-11-06 21:26:02 +01:00
</section>
</section>
</section>
<section id="deployment">
2023-06-18 20:45:39 +02:00
<h2>Déploiement<a class="headerlink" href="#deployment" title="Lien permanent vers cette rubrique">#</a></h2>
<p>Il y a plusieurs méthodes pour démarrer et servir lapplication web <strong>FitTrackee</strong> et lapplication de gestion de la file dattente de tâches. Un des moyens est dutiliser les services <strong>systemd</strong> et <strong>Nginx</strong> to proxy passer à <strong>Gunicorn</strong>.</p>
2023-06-24 08:48:15 +02:00
<p>Exemples (à adapter selon la configuration de votre instance et votre système dexploitation) :</p>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>pour lapplication : <code class="docutils literal notranslate"><span class="pre">fittrackee.service</span></code></p></li>
2020-12-30 11:12:35 +01:00
</ul>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">Unit</span><span class="p">]</span>
<span class="n">Description</span><span class="o">=</span><span class="n">FitTrackee</span> <span class="n">service</span>
<span class="n">After</span><span class="o">=</span><span class="n">network</span><span class="o">.</span><span class="n">target</span>
<span class="n">After</span><span class="o">=</span><span class="n">postgresql</span><span class="o">.</span><span class="n">service</span>
<span class="n">After</span><span class="o">=</span><span class="n">redis</span><span class="o">.</span><span class="n">service</span>
<span class="n">StartLimitIntervalSec</span><span class="o">=</span><span class="mi">0</span>
<span class="p">[</span><span class="n">Service</span><span class="p">]</span>
<span class="n">Type</span><span class="o">=</span><span class="n">simple</span>
<span class="n">Restart</span><span class="o">=</span><span class="n">always</span>
<span class="n">RestartSec</span><span class="o">=</span><span class="mi">1</span>
<span class="n">User</span><span class="o">=&lt;</span><span class="n">USER</span><span class="o">&gt;</span>
<span class="n">StandardOutput</span><span class="o">=</span><span class="n">syslog</span>
<span class="n">StandardError</span><span class="o">=</span><span class="n">syslog</span>
<span class="n">SyslogIdentifier</span><span class="o">=</span><span class="n">fittrackee</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;APP_SECRET_KEY=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;APP_LOG=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;UPLOAD_FOLDER=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;DATABASE_URL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;UI_URL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;EMAIL_URL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;SENDER_EMAIL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;REDIS_URL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;TILE_SERVER_URL=&quot;</span>
2022-07-13 15:21:01 +02:00
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;STATICMAP_SUBDOMAINS=&quot;</span>
2020-12-30 11:12:35 +01:00
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;MAP_ATTRIBUTION=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;WEATHER_API_KEY=&quot;</span>
<span class="n">WorkingDirectory</span><span class="o">=/</span><span class="n">home</span><span class="o">/&lt;</span><span class="n">USER</span><span class="o">&gt;/&lt;</span><span class="n">FITTRACKEE</span> <span class="n">DIRECTORY</span><span class="o">&gt;</span>
<span class="n">ExecStart</span><span class="o">=/</span><span class="n">home</span><span class="o">/&lt;</span><span class="n">USER</span><span class="o">&gt;/&lt;</span><span class="n">FITTRACKEE</span> <span class="n">DIRECTORY</span><span class="o">&gt;/.</span><span class="n">venv</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">gunicorn</span> <span class="o">-</span><span class="n">b</span> <span class="mf">127.0.0.1</span><span class="p">:</span><span class="mi">5000</span> <span class="s2">&quot;fittrackee:create_app()&quot;</span> <span class="o">--</span><span class="n">error</span><span class="o">-</span><span class="n">logfile</span> <span class="o">/</span><span class="n">home</span><span class="o">/&lt;</span><span class="n">USER</span><span class="o">&gt;/&lt;</span><span class="n">FITTRACKEE</span> <span class="n">DIRECTORY</span><span class="o">&gt;/</span><span class="n">gunicorn</span><span class="o">.</span><span class="n">log</span>
2020-12-30 11:12:35 +01:00
<span class="n">Restart</span><span class="o">=</span><span class="n">always</span>
<span class="p">[</span><span class="n">Install</span><span class="p">]</span>
<span class="n">WantedBy</span><span class="o">=</span><span class="n">multi</span><span class="o">-</span><span class="n">user</span><span class="o">.</span><span class="n">target</span>
</pre></div>
</div>
2021-02-21 00:09:10 +01:00
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Pour gérer les fichiers de taille importante, une valeur plus importante pour le <a class="reference external" href="https://docs.gunicorn.org/en/stable/settings.html#timeout">timeout</a> peut être configurée.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Plus dinformations sur le déploiement avec Gunicorn dans sa <a class="reference external" href="https://docs.gunicorn.org/en/stable/deploy.html">documentation</a>.</p>
2021-02-21 00:09:10 +01:00
</div>
2020-12-30 11:12:35 +01:00
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>pour les <em>workers</em> de la file dattente : <code class="docutils literal notranslate"><span class="pre">fittrackee_workers.service</span></code></p></li>
2020-12-30 11:12:35 +01:00
</ul>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">Unit</span><span class="p">]</span>
<span class="n">Description</span><span class="o">=</span><span class="n">FitTrackee</span> <span class="n">task</span> <span class="n">queue</span> <span class="n">service</span>
<span class="n">After</span><span class="o">=</span><span class="n">network</span><span class="o">.</span><span class="n">target</span>
<span class="n">After</span><span class="o">=</span><span class="n">postgresql</span><span class="o">.</span><span class="n">service</span>
<span class="n">After</span><span class="o">=</span><span class="n">redis</span><span class="o">.</span><span class="n">service</span>
<span class="n">StartLimitIntervalSec</span><span class="o">=</span><span class="mi">0</span>
<span class="p">[</span><span class="n">Service</span><span class="p">]</span>
<span class="n">Type</span><span class="o">=</span><span class="n">simple</span>
<span class="n">Restart</span><span class="o">=</span><span class="n">always</span>
<span class="n">RestartSec</span><span class="o">=</span><span class="mi">1</span>
<span class="n">User</span><span class="o">=&lt;</span><span class="n">USER</span><span class="o">&gt;</span>
<span class="n">StandardOutput</span><span class="o">=</span><span class="n">syslog</span>
<span class="n">StandardError</span><span class="o">=</span><span class="n">syslog</span>
<span class="n">SyslogIdentifier</span><span class="o">=</span><span class="n">fittrackee_workers</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;FLASK_APP=fittrackee&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;APP_SECRET_KEY=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;APP_LOG=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;UPLOAD_FOLDER=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;DATABASE_URL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;UI_URL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;EMAIL_URL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;SENDER_EMAIL=&quot;</span>
<span class="n">Environment</span><span class="o">=</span><span class="s2">&quot;REDIS_URL=&quot;</span>
<span class="n">WorkingDirectory</span><span class="o">=/</span><span class="n">home</span><span class="o">/&lt;</span><span class="n">USER</span><span class="o">&gt;/&lt;</span><span class="n">FITTRACKEE</span> <span class="n">DIRECTORY</span><span class="o">&gt;</span>
<span class="n">ExecStart</span><span class="o">=/</span><span class="n">home</span><span class="o">/&lt;</span><span class="n">USER</span><span class="o">&gt;/&lt;</span><span class="n">FITTRACKEE</span> <span class="n">DIRECTORY</span><span class="o">&gt;/.</span><span class="n">venv</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">flask</span> <span class="n">worker</span> <span class="o">--</span><span class="n">processes</span> <span class="o">&lt;</span><span class="n">NUMBER</span> <span class="n">OF</span> <span class="n">PROCESSES</span><span class="o">&gt;</span>
<span class="n">Restart</span><span class="o">=</span><span class="n">always</span>
<span class="p">[</span><span class="n">Install</span><span class="p">]</span>
<span class="n">WantedBy</span><span class="o">=</span><span class="n">multi</span><span class="o">-</span><span class="n">user</span><span class="o">.</span><span class="n">target</span>
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>Configuration <strong>Nginx</strong> :</p></li>
2020-12-30 11:12:35 +01:00
</ul>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>server {
2022-02-05 22:09:17 +01:00
listen 443 ssl http2;
2020-12-30 11:12:35 +01:00
server_name example.com;
ssl_certificate fullchain.pem;
ssl_certificate_key privkey.pem;
2022-11-05 10:10:25 +01:00
## this parameter controls how large of a file can be
## uploaded, and defaults to 1MB. If you change the FitTrackee
## settings to allow larger uploads, you&#39;ll need to change this
## setting by uncommenting the line below and setting the size limit
## you want. Set to &quot;0&quot; to prevent nginx from checking the
## request body size at all
# client_max_body_size 1m;
2020-12-30 11:12:35 +01:00
location / {
proxy_pass http://127.0.0.1:5000;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
2022-08-27 16:50:29 +02:00
proxy_set_header X-Forwarded-Proto $scheme;
2020-12-30 11:12:35 +01:00
}
}
server {
listen 80;
server_name example.com;
location / {
return 301 https://example.com$request_uri;
}
}
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Si besoin, modifier la configuration pour gérer les fichiers de taille importante (cf. <a class="reference external" href="https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size">client_max_body_size</a>).</p>
2020-12-30 11:12:35 +01:00
</div>
2021-11-06 21:26:02 +01:00
</section>
<section id="docker">
2023-06-18 15:23:33 +02:00
<h2>Docker<a class="headerlink" href="#docker" title="Lien permanent vers cette rubrique">#</a></h2>
2022-09-18 09:30:10 +02:00
<section id="id6">
2023-06-18 15:23:33 +02:00
<h3>Installation<a class="headerlink" href="#id6" title="Lien permanent vers cette rubrique">#</a></h3>
2021-01-31 12:03:17 +01:00
<div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.4.4.</span></p>
2021-01-31 12:03:17 +01:00
</div>
2023-06-24 08:48:15 +02:00
<p>A des fins dévaluation, des fichiers Docker sont disponible, installant <strong>FitTrackee</strong> à partir des <strong>sources</strong>.</p>
2021-01-31 12:03:17 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Pour installer <strong>FitTrackee</strong> :</p></li>
2021-01-31 12:03:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/SamR1/FitTrackee.git
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>FitTrackee
$<span class="w"> </span>cp<span class="w"> </span>.env.docker<span class="w"> </span>.env
$<span class="w"> </span>make<span class="w"> </span>docker-build
2021-01-31 12:03:17 +01:00
</pre></div>
</div>
2022-07-23 11:56:03 +02:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Pour initialiser la base de données :</p></li>
2022-07-23 11:56:03 +02:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-init
2022-07-23 11:56:03 +02:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Ouvrir lURL <a class="reference external" href="http://localhost:5000">http://localhost:5000</a> avec un navigateur et sinscrire.</p></li>
2022-07-23 11:56:03 +02:00
</ul>
2023-06-18 20:45:39 +02:00
<p>Ouvrir lURL <a class="reference external" href="http://localhost:8025">http://localhost:8025</a> pour accéder à linterface de <a class="reference external" href="https://github.com/mailhog/MailHog">MailHog</a> (outil de test)</p>
2021-01-31 12:03:17 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Pour donner les droits dadministration au compte nouvellement créé utiliser la ligne de commande suivante :</p></li>
2022-02-13 09:52:34 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-set-admin<span class="w"> </span><span class="nv">USERNAME</span><span class="o">=</span>&lt;username&gt;
2022-02-13 09:52:34 +01:00
</pre></div>
</div>
2022-03-27 15:11:12 +02:00
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Si le compte de lutilisateur est inactif, il sera alors activée.</p>
2022-03-27 15:11:12 +02:00
</div>
2022-02-13 09:52:34 +01:00
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Pour arrêter <strong>Fittrackee</strong> :</p></li>
2021-01-31 12:03:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-stop
2021-01-31 12:03:17 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>pour démarrer <strong>Fittrackee</strong> (application et <em>workers</em> dramatiq) :</p></li>
2021-01-31 12:03:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-run-all
2021-01-31 12:03:17 +01:00
</pre></div>
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>Pour lancer le shell dans le container <strong>Fittrackee</strong> :</p></li>
2021-01-31 12:03:17 +01:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-shell
2021-01-31 12:03:17 +01:00
</pre></div>
</div>
2021-11-06 21:26:02 +01:00
</section>
2021-11-06 22:18:38 +01:00
<section id="development">
2023-06-18 20:45:39 +02:00
<h3>Développement<a class="headerlink" href="#development" title="Lien permanent vers cette rubrique">#</a></h3>
2021-10-17 09:28:56 +02:00
<div class="versionadded">
2023-06-18 15:23:33 +02:00
<p><span class="versionmodified added">Nouveau dans la version 0.5.0.</span></p>
2021-10-17 09:28:56 +02:00
</div>
<ul class="simple">
2023-06-18 20:45:39 +02:00
<li><p>une étape additionnelle est nécessaire pour installer <cite>fittrackee_client</cite></p></li>
2021-10-17 09:28:56 +02:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-build-client
2021-10-17 09:28:56 +02:00
</pre></div>
</div>
<ul class="simple">
2023-06-24 08:48:15 +02:00
<li><p>pour démarrer <strong>FitTrackee</strong> avec les outils de développement client :</p></li>
2021-10-17 09:28:56 +02:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-serve-client
2021-10-17 09:28:56 +02:00
</pre></div>
</div>
2023-06-18 20:45:39 +02:00
<p>Ouvrir <a class="reference external" href="http://localhost:3000">http://localhost:3000</a></p>
2021-11-06 22:18:38 +01:00
<div class="admonition note">
<p class="admonition-title">Note</p>
2023-06-18 20:45:39 +02:00
<p>Certaines variables denvironnement doivent être mise à jour comme <code class="docutils literal notranslate"><span class="pre">UI_URL</span></code></p>
2021-11-06 22:18:38 +01:00
</div>
2022-07-23 11:56:03 +02:00
<ul class="simple">
2023-06-21 19:45:47 +02:00
<li><p>pour lancer le <em>lint</em> et les tests :</p></li>
2022-07-23 11:56:03 +02:00
</ul>
2023-02-16 11:18:50 +01:00
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docker-lint-client<span class="w"> </span><span class="c1"># run lint on javascript files</span>
$<span class="w"> </span>make<span class="w"> </span>docker-test-client<span class="w"> </span><span class="c1"># run unit tests on Client</span>
$<span class="w"> </span>make<span class="w"> </span>docker-lint-python<span class="w"> </span><span class="c1"># run type check and lint on python files</span>
$<span class="w"> </span>make<span class="w"> </span>docker-test-python<span class="w"> </span><span class="c1"># run unit tests on API</span>
2022-07-23 11:56:03 +02:00
</pre></div>
</div>
2021-11-06 21:26:02 +01:00
</section>
</section>
2023-04-12 17:32:08 +02:00
<section id="yunohost">
2023-06-18 15:23:33 +02:00
<h2>Yunohost<a class="headerlink" href="#yunohost" title="Lien permanent vers cette rubrique">#</a></h2>
2023-06-21 19:45:47 +02:00
<p>Un paquet est disponible, cf. <a class="reference external" href="https://github.com/YunoHost-Apps/fittrackee_ynh">https://github.com/YunoHost-Apps/fittrackee_ynh</a>.</p>
2023-04-12 17:32:08 +02:00
</section>
2021-11-06 21:26:02 +01:00
</section>
2020-12-30 11:12:35 +01:00
</article>
</div>
<footer>
<div class="related-pages">
<a class="next-page" href="cli.html">
<div class="page-info">
<div class="context">
<span>Next</span>
</div>
2023-06-18 20:45:39 +02:00
<div class="title">Interface de ligne de commande</div>
</div>
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
</a>
<a class="prev-page" href="oauth.html">
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
<div class="page-info">
<div class="context">
<span>Previous</span>
</div>
<div class="title">OAuth 2.0</div>
</div>
</a>
</div>
<div class="bottom-of-page">
<div class="left-details">
<div class="copyright">
Copyright &#169; 2018 - 2023, SamR1
</div>
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo</a>
</div>
<div class="right-details">
<div class="icons">
<a class="muted-link fa fa-github fa-lg" href="https://github.com/SamR1/FitTrackee" aria-label="GitHub"></a>
<a class="muted-link fa fa-mastodon fa-lg" href="https://fosstodon.org/@FitTrackee" aria-label="Mastodon"></a>
</div>
</div>
</div>
</footer>
2020-12-30 11:12:35 +01:00
</div>
<aside class="toc-drawer">
2020-12-30 11:12:35 +01:00
<div class="toc-sticky toc-scroll">
<div class="toc-title-container">
<span class="toc-title">
On this page
</span>
</div>
<div class="toc-tree-container">
<div class="toc-tree">
<ul>
<li><a class="reference internal" href="#">Installation</a><ul>
2023-06-18 20:45:39 +02:00
<li><a class="reference internal" href="#prerequisites">Prérequis</a></li>
<li><a class="reference internal" href="#environment-variables">Variables denvironnement</a><ul>
<li><a class="reference internal" href="#emails">Courriels</a></li>
<li><a class="reference internal" href="#map-tile-server">Serveur de tuiles</a></li>
<li><a class="reference internal" href="#api-rate-limits">Limitation daccès à lAPI</a></li>
<li><a class="reference internal" href="#weather-data">Données météo</a></li>
</ul>
</li>
<li><a class="reference internal" href="#id2">Installation</a><ul>
2023-06-18 20:45:39 +02:00
<li><a class="reference internal" href="#from-pypi">A partir de PyPI</a></li>
<li><a class="reference internal" href="#from-sources">A partir des sources</a><ul>
<li><a class="reference internal" href="#dev-environment">Environnements de développement</a></li>
<li><a class="reference internal" href="#production-environment">Environnements de production</a></li>
</ul>
</li>
</ul>
</li>
2023-06-18 20:45:39 +02:00
<li><a class="reference internal" href="#upgrade">Mise à jour</a><ul>
<li><a class="reference internal" href="#id3">A partir de PyPI</a></li>
<li><a class="reference internal" href="#id4">A partir des sources</a><ul>
<li><a class="reference internal" href="#id5">Environnements de développement</a></li>
<li><a class="reference internal" href="#prod-environment">Environnement de production</a></li>
</ul>
</li>
</ul>
</li>
2023-06-18 20:45:39 +02:00
<li><a class="reference internal" href="#deployment">Déploiement</a></li>
<li><a class="reference internal" href="#docker">Docker</a><ul>
<li><a class="reference internal" href="#id6">Installation</a></li>
2023-06-18 20:45:39 +02:00
<li><a class="reference internal" href="#development">Développement</a></li>
</ul>
</li>
<li><a class="reference internal" href="#yunohost">Yunohost</a></li>
</ul>
</li>
</ul>
2022-11-27 12:06:42 +01:00
</div>
</div>
</div>
</aside>
</div>
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/scripts/furo.js"></script>
<script src="_static/clipboard.min.js"></script>
<script src="_static/copybutton.js"></script>
2023-06-18 15:23:33 +02:00
<script src="_static/translations.js"></script>
</body>
2020-12-30 11:12:35 +01:00
</html>