EnvoleBonnesPratiques » Historique » Version 23
Gaston TJEBBES, 23/04/2010 15:59
| 1 | 21 | Gérald Schwartzmann | h2. !http://dev-eole.ac-dijon.fr/attachments/download/9/puce.png! Environnement Libre Ouvert Evolutif - Envole |
|---|---|---|---|
| 2 | 21 | Gérald Schwartzmann | {{include(eole:menu)}} |
| 3 | 1 | Gérald Schwartzmann | |
| 4 | 21 | Gérald Schwartzmann | h1. [[Développement|Développement]] |
| 5 | 20 | Gérald Schwartzmann | |
| 6 | 1 | Gérald Schwartzmann | h1. Les Bonnes Pratiques |
| 7 | 22 | Gérald Schwartzmann | |
| 8 | 22 | Gérald Schwartzmann | {{include(ModeleEbauche)}} |
| 9 | 6 | Gérald Schwartzmann | |
| 10 | 7 | Gérald Schwartzmann | h2. Documentations, sources et articles wiki |
| 11 | 8 | Gérald Schwartzmann | |
| 12 | 12 | Gérald Schwartzmann | Voici "Les bonnes pratiques sur le nommage des applications EOLE":http://eole.orion.education.fr/wiki/index.php/DocumentationDokiel |
| 13 | 6 | Gérald Schwartzmann | |
| 14 | 9 | Gérald Schwartzmann | h2. Git |
| 15 | 6 | Gérald Schwartzmann | |
| 16 | 7 | Gérald Schwartzmann | h3. Placement |
| 17 | 1 | Gérald Schwartzmann | |
| 18 | 11 | Gérald Schwartzmann | Les applications de Envole sont des sous-projets de "Envole":http://dev-eole.ac-dijon.fr/projects/envole . |
| 19 | 13 | Gérald Schwartzmann | Dans le dépôt ils apparaissent les un à côté des autres (à plat). |
| 20 | 1 | Gérald Schwartzmann | |
| 21 | 13 | Gérald Schwartzmann | h3. Les Bonnes Pratiques |
| 22 | 13 | Gérald Schwartzmann | "Les Bonnes Pratiques":http://dev-eole.ac-dijon.fr/projects/eole-interne/wiki/GitBonnesPratiques |
| 23 | 13 | Gérald Schwartzmann | |
| 24 | 1 | Gérald Schwartzmann | h3. Nommage |
| 25 | 8 | Gérald Schwartzmann | |
| 26 | 14 | Gérald Schwartzmann | Le nom des sous-projets doivent être en minuscule |
| 27 | 6 | Gérald Schwartzmann | |
| 28 | 13 | Gérald Schwartzmann | Exemple dans la liste des sous-projets : http://dev-eole.ac-dijon.fr/projects/envole |
| 29 | 6 | Gérald Schwartzmann | |
| 30 | 14 | Gérald Schwartzmann | h3. Structure du Master |
| 31 | 6 | Gérald Schwartzmann | |
| 32 | 14 | Gérald Schwartzmann | Puisque votre développement n'est pas la branche d'un projet déjà existant on réalise un master.<br /> |
| 33 | 14 | Gérald Schwartzmann | Pour cela il faut créer selon les besoins de votre application les fichiers et répertoires suivant : |
| 34 | 6 | Gérald Schwartzmann | - Makefile |
| 35 | 6 | Gérald Schwartzmann | - debian/ |
| 36 | 6 | Gérald Schwartzmann | - dicos/ |
| 37 | 6 | Gérald Schwartzmann | - mysql/ |
| 38 | 6 | Gérald Schwartzmann | - patch/ |
| 39 | 6 | Gérald Schwartzmann | - sso/ |
| 40 | 6 | Gérald Schwartzmann | - source_de_votre_appli_num_de_version/ |
| 41 | 6 | Gérald Schwartzmann | - tmpls/ |
| 42 | 6 | Gérald Schwartzmann | - etc/ |
| 43 | 6 | Gérald Schwartzmann | |
| 44 | 14 | Gérald Schwartzmann | Exemple : http://dev-eole.ac-dijon.fr/projects/dokuwiki/repository |
| 45 | 6 | Gérald Schwartzmann | |
| 46 | 7 | Gérald Schwartzmann | h2. Les fichiers templates |
| 47 | 8 | Gérald Schwartzmann | |
| 48 | 6 | Gérald Schwartzmann | Le nom d'un fichier templétisé ne doit pas porté le même nom qu'un autre pour cela il faut préfixer le nom du fichier avec le nom de l'application. |
| 49 | 6 | Gérald Schwartzmann | |
| 50 | 6 | Gérald Schwartzmann | Exemple du fichier config.php qui est présent dans une bonne partie des applications : |
| 51 | 6 | Gérald Schwartzmann | |
| 52 | 6 | Gérald Schwartzmann | taskfreak_config.php |
| 53 | 6 | Gérald Schwartzmann | |
| 54 | 7 | Gérald Schwartzmann | h2. Dico |
| 55 | 8 | Gérald Schwartzmann | |
| 56 | 7 | Gérald Schwartzmann | h3. Nommage |
| 57 | 8 | Gérald Schwartzmann | |
| 58 | 6 | Gérald Schwartzmann | Les applications du socle |
| 59 | 6 | Gérald Schwartzmann | <pre>5x_nom_de_l_application.xml</pre> |
| 60 | 6 | Gérald Schwartzmann | Les applications supplémentaires au socle |
| 61 | 6 | Gérald Schwartzmann | <pre>6x_nom_de_l_application.xml</pre> |
| 62 | 6 | Gérald Schwartzmann | x étant supérieur à 0 |
| 63 | 6 | Gérald Schwartzmann | |
| 64 | 7 | Gérald Schwartzmann | h3. construction du fichier |
| 65 | 8 | Gérald Schwartzmann | |
| 66 | 15 | Gérald Schwartzmann | {{include(ModeleFixme)}} |
| 67 | 6 | Gérald Schwartzmann | |
| 68 | 7 | Gérald Schwartzmann | h2. Paquetage |
| 69 | 8 | Gérald Schwartzmann | |
| 70 | 6 | Gérald Schwartzmann | eole-nom_de_l_application |
| 71 | 6 | Gérald Schwartzmann | |
| 72 | 7 | Gérald Schwartzmann | h2. Apache |
| 73 | 1 | Gérald Schwartzmann | |
| 74 | 15 | Gérald Schwartzmann | h3. nommage du fichier de conf dans sites-enabled |
| 75 | 15 | Gérald Schwartzmann | |
| 76 | 6 | Gérald Schwartzmann | Un fichier de conf apache par application : |
| 77 | 1 | Gérald Schwartzmann | <pre>apache-nom_de_l_application.conf</pre> |
| 78 | 15 | Gérald Schwartzmann | |
| 79 | 15 | Gérald Schwartzmann | h3. contenu du fichier de conf dans sites-enabled |
| 80 | 15 | Gérald Schwartzmann | |
| 81 | 19 | Gérald Schwartzmann | Le chemin de l'application doit être son nom |
| 82 | 19 | Gérald Schwartzmann | |
| 83 | 16 | Gérald Schwartzmann | Si un projet ne contient pas de .htaccess il faut ajouter la directive *AllowOverride None*. |
| 84 | 16 | Gérald Schwartzmann | Celle-ci permet de diminuer le délai d'attente en lui évitant de partir à la recherche de fichier .htaccess dans chaque répertoire qu'il visite. |
| 85 | 16 | Gérald Schwartzmann | |
| 86 | 18 | Gérald Schwartzmann | Date d'expiration du cache proxy ou navigateur. |
| 87 | 18 | Gérald Schwartzmann | Régler correctement et finement le cache des clients permet d'éviter un grand nombre de requête. |
| 88 | 18 | Gérald Schwartzmann | En prévision de l'activation du *mod_expires* sur le serveur Apache, on peut ajouter la directive *ExpiresActive On* suivit de directive *ExpiresByType type "durée de vie dans le cache"* |
| 89 | 18 | Gérald Schwartzmann | |
| 90 | 18 | Gérald Schwartzmann | <pre> |
| 91 | 18 | Gérald Schwartzmann | <IfModule mod_expires.c> |
| 92 | 18 | Gérald Schwartzmann | ExpiresActive On |
| 93 | 18 | Gérald Schwartzmann | ExpiresByType text/html "access plus 1 day" |
| 94 | 18 | Gérald Schwartzmann | </IfModule> |
| 95 | 18 | Gérald Schwartzmann | </pre> |
| 96 | 18 | Gérald Schwartzmann | |
| 97 | 18 | Gérald Schwartzmann | Exemple complet d'un fichier de configuration d'une application : |
| 98 | 16 | Gérald Schwartzmann | |
| 99 | 16 | Gérald Schwartzmann | <pre> |
| 100 | 16 | Gérald Schwartzmann | # Envole Infos |
| 101 | 16 | Gérald Schwartzmann | # Equipe EOLE |
| 102 | 16 | Gérald Schwartzmann | Alias /envole-infos /var/www/html/envole-infos |
| 103 | 16 | Gérald Schwartzmann | <Directory "/var/www/html/envole-infos"> |
| 104 | 17 | Gérald Schwartzmann | AllowOverride None |
| 105 | 16 | Gérald Schwartzmann | AddDefaultCharset UTF-8 |
| 106 | 16 | Gérald Schwartzmann | DirectoryIndex index.php |
| 107 | 16 | Gérald Schwartzmann | Order Allow,Deny |
| 108 | 16 | Gérald Schwartzmann | Allow from All |
| 109 | 16 | Gérald Schwartzmann | <IfModule mod_expires.c> |
| 110 | 16 | Gérald Schwartzmann | ExpiresActive On |
| 111 | 16 | Gérald Schwartzmann | ExpiresByType text/html "access plus 1 day" |
| 112 | 16 | Gérald Schwartzmann | ExpiresByType text/xml "access plus 1 day" |
| 113 | 16 | Gérald Schwartzmann | ExpiresByType image/gif "access plus 1 week" |
| 114 | 16 | Gérald Schwartzmann | ExpiresByType image/jpg "access plus 1 week" |
| 115 | 16 | Gérald Schwartzmann | ExpiresByType image/png "access plus 1 week" |
| 116 | 16 | Gérald Schwartzmann | ExpiresByType video/quicktime "access plus 1 month" |
| 117 | 16 | Gérald Schwartzmann | ExpiresByType audio/mpeg "access plus 1 month" |
| 118 | 16 | Gérald Schwartzmann | ExpiresByType application/pdf "access plus 1 month" |
| 119 | 16 | Gérald Schwartzmann | ExpiresByType application/ps "access plus 1 month" |
| 120 | 16 | Gérald Schwartzmann | ExpiresByType text/css "access plus 1 day" |
| 121 | 16 | Gérald Schwartzmann | ExpiresByType application/x-shockwave-flash "access plus 1 day" |
| 122 | 16 | Gérald Schwartzmann | ExpiresByType text/js "access plus 1 week" |
| 123 | 16 | Gérald Schwartzmann | ExpiresByType text/javascript "access plus 1 week" |
| 124 | 16 | Gérald Schwartzmann | ExpiresByType application/x-javascript "access plus 1 week" |
| 125 | 16 | Gérald Schwartzmann | ExpiresByType image/x-icon "access plus 1 day" |
| 126 | 16 | Gérald Schwartzmann | </IfModule> |
| 127 | 16 | Gérald Schwartzmann | </Directory> |
| 128 | 16 | Gérald Schwartzmann | </pre> |
| 129 | 15 | Gérald Schwartzmann | |
| 130 | 15 | Gérald Schwartzmann | h3. les droits dans /var/www/html/ |
| 131 | 6 | Gérald Schwartzmann | |
| 132 | 23 | Gaston TJEBBES | Application des droits minimaux sur les répertoires: |
| 133 | 1 | Gérald Schwartzmann | |
| 134 | 23 | Gaston TJEBBES | <pre> |
| 135 | 23 | Gaston TJEBBES | # Définition du propriétaire du répertoire |
| 136 | 23 | Gaston TJEBBES | /bin/chown -R root:www-data /var/www/html/votre_appli<br /> |
| 137 | 23 | Gaston TJEBBES | # Définition des droits minimaux pour les répertoires (ont besoin d'être exécutables) |
| 138 | 23 | Gaston TJEBBES | /bin/chmod -R 750 /var/www/html/votre_appli<br /> |
| 139 | 23 | Gaston TJEBBES | # Définition des droits minimaux pour les fichiers |
| 140 | 23 | Gaston TJEBBES | /usr/bin/find /var/www/html/votre_appli -type f -exec /bin/chmod ugo-x {} \; |
| 141 | 23 | Gaston TJEBBES | </pre> |
| 142 | 23 | Gaston TJEBBES | |
| 143 | 23 | Gaston TJEBBES | Pour des raisons de sécurité seuls les fichiers nécessitant d'être modifiés par l'application sont éditables par l'utilisateur avec lequel est lancé apache à savoir www-data<br /> |
| 144 | 23 | Gaston TJEBBES | <pre> |
| 145 | 23 | Gaston TJEBBES | /bin/chmod 770 /var/www/html/votre_appli/datas |
| 146 | 23 | Gaston TJEBBES | /bin/chmod 660 /var/www/html/votre_appli/datas/*.* |
| 147 | 23 | Gaston TJEBBES | </pre> |
| 148 | 6 | Gérald Schwartzmann | |
| 149 | 7 | Gérald Schwartzmann | h2. Base de données |
| 150 | 8 | Gérald Schwartzmann | |
| 151 | 6 | Gérald Schwartzmann | <pre>scribe-nom_de_l_application.sql</pre> |
| 152 | 6 | Gérald Schwartzmann | |
| 153 | 6 | Gérald Schwartzmann | Si la bdd nécessite une templétisation il est préférable de découper la bdd en deux fichiers MySql.<br /> |
| 154 | 6 | Gérald Schwartzmann | L'un avec la partie à templétiser et l'autre avec le reste.<br /> |
| 155 | 6 | Gérald Schwartzmann | Cette découpe fait gagner un temps considérable lors du reconfigure.<br /> |
| 156 | 6 | Gérald Schwartzmann | |
| 157 | 7 | Gérald Schwartzmann | h2. {{include(ModeleFixme)}} |
| 158 | 6 | Gérald Schwartzmann | |
| 159 | 6 | Gérald Schwartzmann | Où stocker les données des applications d'Envole ?<br /> |
| 160 | 6 | Gérald Schwartzmann | exemple Moodle<br /> |
| 161 | 6 | Gérald Schwartzmann | les données sont pour le moment stockées dans /var/www/<br /> |
| 162 | 6 | Gérald Schwartzmann | serait-ce mieux dans /home/<br /> |
| 163 | 6 | Gérald Schwartzmann | sauvegarde de Bacule ? |