Afficher les derniers auteurs
| author | version | line-number | content |
|---|---|---|---|
| 1 | Le wiki qui héberge cette documentation. | ||
| 2 | |||
| 3 | == Architecture == | ||
| 4 | |||
| 5 | |=Conteneur|=Rôle | ||
| 6 | |xwiki-mariadb-tomcat-web|XWiki (version LTS) sur Tomcat | ||
| 7 | |xwiki-mariadb-db|Base MariaDB | ||
| 8 | |||
| 9 | == Stack == | ||
| 10 | |||
| 11 | {{code language="yaml"}} | ||
| 12 | networks: | ||
| 13 | xwiki: | ||
| 14 | driver: bridge | ||
| 15 | proxy: | ||
| 16 | external: true | ||
| 17 | services: | ||
| 18 | db: | ||
| 19 | image: mariadb:11.4 | ||
| 20 | container_name: xwiki-mariadb-db | ||
| 21 | restart: unless-stopped | ||
| 22 | environment: | ||
| 23 | - MYSQL_ROOT_PASSWORD=<MOT_DE_PASSE_ROOT> | ||
| 24 | - MYSQL_DATABASE=<BASE> | ||
| 25 | - MYSQL_USER=<UTILISATEUR> | ||
| 26 | - MYSQL_PASSWORD=<MOT_DE_PASSE> | ||
| 27 | - MARIADB_AUTO_UPGRADE=1 | ||
| 28 | volumes: | ||
| 29 | - <APPDATA>/xwiki/xwiki.cnf:/etc/mysql/conf.d/xwiki.cnf | ||
| 30 | - <APPDATA>/xwiki/mariadb:/var/lib/mysql | ||
| 31 | - ./init.sql:/docker-entrypoint-initdb.d/init.sql | ||
| 32 | networks: | ||
| 33 | - xwiki | ||
| 34 | web: | ||
| 35 | image: xwiki:lts-mariadb-tomcat | ||
| 36 | container_name: xwiki-mariadb-tomcat-web | ||
| 37 | depends_on: | ||
| 38 | - db | ||
| 39 | restart: unless-stopped | ||
| 40 | environment: | ||
| 41 | - DB_USER=<UTILISATEUR> | ||
| 42 | - DB_PASSWORD=<MOT_DE_PASSE> | ||
| 43 | - DB_HOST=xwiki-mariadb-db | ||
| 44 | - JAVA_OPTS=-Xmx1024m -Denvironment.permanentDirectory=/usr/local/xwiki -Dxwiki.data.dir=/usr/local/xwiki -Dxwiki.store.attachment.hint=file -Dxwiki.store.attachment.versioning.hint=file | ||
| 45 | volumes: | ||
| 46 | - <APPDATA>/xwiki/data:/usr/local/xwiki | ||
| 47 | - <APPDATA>/xwiki/xwiki.cfg:/usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.cfg | ||
| 48 | - <APPDATA>/xwiki/server.xml:/usr/local/tomcat/conf/server.xml | ||
| 49 | ports: | ||
| 50 | - "8080:8080" | ||
| 51 | networks: | ||
| 52 | - xwiki | ||
| 53 | - proxy | ||
| 54 | {{/code}} | ||
| 55 | |||
| 56 | == Fichiers de configuration == | ||
| 57 | |||
| 58 | |=Fichier|=Rôle | ||
| 59 | |##xwiki.cnf##|Réglages MariaDB propres à XWiki | ||
| 60 | |##init.sql##|Initialisation de la base, au premier démarrage uniquement (chemin relatif au dossier de la stack Portainer) | ||
| 61 | |##xwiki.cfg##|Configuration de XWiki | ||
| 62 | |##server.xml##|Configuration de Tomcat | ||
| 63 | |||
| 64 | {{warning}} | ||
| 65 | ##xwiki.cfg## et ##server.xml## remplacent ceux de l'image. Après une montée de version de XWiki ou de Tomcat, vérifier dans les notes de version s'ils ont changé ; un fichier ancien peut empêcher le démarrage. | ||
| 66 | {{/warning}} | ||
| 67 | |||
| 68 | == Données == | ||
| 69 | |||
| 70 | * Répertoire permanent : ##<APPDATA>/xwiki/data##, monté sur ##/usr/local/xwiki##. Les données de XWiki sont dans le sous-dossier ##data##, d'où le double ##data## dans le chemin sur l'hôte. | ||
| 71 | * Pièces jointes et leur historique stockés en fichiers (##attachment.hint=file##), pas dans la base. | ||
| 72 | * Index de recherche Solr dans ##data/store/solr## et ##data/cache/solr## : ils se reconstruisent à partir de la base (voir [[Dépannage>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Depannage.WebHome]]). | ||
| 73 | |||
| 74 | == Mémoire == | ||
| 75 | |||
| 76 | ##-Xmx1024m## limite la mémoire Java à 1 Go. Si le wiki ralentit ou s'arrête avec une erreur ##OutOfMemoryError## dans les journaux, augmenter cette valeur. | ||
| 77 | |||
| 78 | == Sauvegarde == | ||
| 79 | |||
| 80 | * Base : dump SQL de ##xwiki-mariadb-db## par le script de [[Sauvegarde>>Wiki Batcave John.Infrastructure.Sauvegarde.WebHome]]. Les fichiers bruts ##xwiki/mariadb## sont exclus. | ||
| 81 | * Pièces jointes et configuration : ##<APPDATA>/xwiki##, sauvegardé tel quel. |