Présentation de l'installation et mise à jour du module par ordre anté-chronologique :
cd ~/dwl ; wget https://github.com/PnX-SI/gn_module_export/archive/1.3.0.zip -O gn-module-export_v1.3.0.zip unzip gn-module-export_v1.3.0.zip -d ~/www/modules/geonature/ cd ~/www/modules/geonature/ mv gn_module_export-1.3.0 export_v1.3.0 rm -f export_old; ln -s export_v1.2.8 export_old rm -f export; ln -s export_v1.3.0 export cp ~/www/modules/geonature/export_old/config/conf_gn_module.toml ~/www/modules/geonature/export/config/conf_gn_module.toml cp -r ~/www/modules/geonature/export_old/backend/templates/swagger ~/www/modules/geonature/export/backend/templates/ rsync -av -e "ssh -p <port-ssh-db-srv>" /home/geonat/www/modules/geonature/ geonat@db-paca-sinp:/home/geonat/www/modules/geonature/ psql -h localhost -U geonatadmin -d geonature2db -f ~/www/modules/geonature/export/data/migrations/1.2.8to1.3.0.sql cd ~/www/geonature/backend source venv/bin/activate pip install --no-use-pep517 -e /home/geonat/www/modules/geonature/export pip install -e /home/geonat/www/modules/geonature/export cd ~/geonature/external_modules/ ln -s /home/geonat/www/modules/geonature/export exports cd ~/geonature/frontend/src/external_assets/ ln -s /home/geonat/www/modules/geonature/export/frontend/assets exports geonature update-module-configuration --build false EXPORTS geonature update-configuration --build false && geonature generate-frontend-tsconfig && geonature generate-frontend-tsconfig-app && geonature generate-frontend-modules-route geonature db stamp c2d02e345a06 cd ~/geonature/frontend/ nvm use npm run build cd ~/dwl ; wget https://github.com/PnX-SI/gn_module_export/archive/1.2.8.zip -O gn-module-export_v1.2.8.zip unzip gn-module-export_v1.2.8.zip -d ~/www/modules/geonature/ cd ~/www/modules/geonature/ mv gn_module_export-1.2.8 export_v1.2.8 rm -f export_old; ln -s export_v1.2.4 export_old rm -f export; ln -s export_v1.2.8 export cp ~/www/modules/geonature/export_old/config/conf_gn_module.toml ~/www/modules/geonature/export/config/conf_gn_module.toml cp -r ~/www/modules/geonature/export_old/backend/templates/swagger ~/www/modules/geonature/export/backend/templates/ rsync -av -e "ssh -p <port-ssh-db-srv>" /home/geonat/www/modules/geonature/ geonat@db-paca-sinp:/home/geonat/www/modules/geonature/ psql -h localhost -U geonatadmin -d geonature2db -f ~/www/modules/geonature/export/data/migrations/1.2.4to1.2.5.sql cd ~/www/geonature/backend source venv/bin/activate cd ~/geonature/external_modules/ ln -s /home/geonat/www/modules/geonature/export exports cd ~/geonature/frontend/src/external_assets/ ln -s /home/geonat/www/modules/geonature/export/frontend/assets exports geonature update-module-configuration --build false EXPORTS geonature update-configuration --build false && geonature generate-frontend-tsconfig && geonature generate-frontend-tsconfig-app && geonature generate-frontend-modules-route cd ~/geonature/frontend/ nvm use npm run build cd ~/dwl ; wget https://github.com/PnX-SI/gn_module_export/archive/1.2.4.zip -O gn-module-export_v1.2.4.zip unzip gn-module-export_v1.2.4.zip -d ~/www/modules/geonature/ cd ~/www/modules/geonature/ mv gn_module_export-1.2.4 export_v1.2.4 rm -f export_old; ln -s export_v1.2.1 export_old rm -f export; ln -s export_v1.2.4 export cp ~/www/modules/geonature/export_old/config/conf_gn_module.toml ~/www/modules/geonature/export/config/conf_gn_module.toml cp -r ~/www/modules/geonature/export_old/backend/templates/swagger ~/www/modules/geonature/export/backend/templates/ rsync -av -e "ssh -p <port-ssh-db-srv>" /home/geonat/www/modules/geonature/ geonat@db-paca-sinp:/home/geonat/www/modules/geonature/ cd ~/www/geonature/backend source venv/bin/activate geonature install_gn_module /home/geonat/www/modules/geonature/export/ export geonature update_module_configuration EXPORTS cd ~/dwl ; wget https://github.com/PnX-SI/gn_module_export/archive/1.2.1.zip -O gn-module-export_v1.2.1.zip unzip gn-module-export_v1.2.1.zip -d ~/www/modules/geonature/ cd ~/www/modules/geonature/ mv gn_module_export-1.2.1 export_v1.2.1 rm -f export_old; ln -s export_v1.2.0 export_old rm -f export; ln -s export_v1.2.1 export cp ~/www/modules/geonature/export_old/config/conf_gn_module.toml ~/www/modules/geonature/export/config/conf_gn_module.toml cp -r ~/www/modules/geonature/export_old/backend/templates/swagger/ ~/www/modules/geonature/export/backend/templates/swagger/ rsync -av -e "ssh -p <port-ssh-db-srv>" /home/geonat/www/modules/geonature/ geonat@db-paca-sinp:/home/geonat/www/modules/geonature/ cd ~/www/geonature/backend source venv/bin/activate geonature update_module_configuration EXPORTS crontab -e # Déclenchement tous les jours à minuit des exports programmé du module Export 0 0 * * * /home/geonat/www/modules/geonature/export/gn_export_cron.sh /home/geonat/www/geonature
cd ~/dwl ; wget https://github.com/PnX-SI/gn_module_export/archive/1.2.0.zip -O gn-module-export_v1.2.0.zip unzip gn-module-export_v1.2.0.zip -d ~/www/modules/geonature/ cd ~/www/modules/geonature/ mv gn_module_export-1.2.0 export_v1.2.0 ln -s export_v1.0.0 export_old rm -f export; ln -s export_v1.2.0 export cp ~/www/modules/geonature/export_old/config/conf_gn_module.toml ~/www/modules/geonature/export/config/conf_gn_module.toml cp -r ~/www/modules/geonature/export_old/backend/templates/swagger/ ~/www/modules/geonature/export/backend/templates/swagger/ rsync -av -e "ssh -p <port-ssh-db-srv>" /home/geonat/www/modules/geonature/ geonat@db-paca-sinp:/home/geonat/www/modules/geonature/ gn_exports.v_synthese_sinp car déjà mise à jour avec la mise à jour vers 2.5.3 psql -h localhost -U geonatadmin -d geonature2db -f ~/www/modules/geonature/export/data/migrations/1.0.3to1.0.4.sql gn_exports.v_synthese_sinp échoue car la colonne id_nomenclature_obs_meth n'existe pas. Utiliser le code précédemment sauvegardé pour la créer à nouveau. psql -h localhost -U geonatadmin -d geonature2db -f ~/www/modules/geonature/export/data/migrations/1.1.0to1.2.0.sql service nginx reloadconf_gn_module.toml.example dans conf_gn_module.toml et y remplacer :{GN_HOME} par /home/geonat/www/geonature/ . export_web_url par : https://expert.silene.eu/exports/users cd ~/www/geonature/backend source venv/bin/activate geonature update_module_configuration EXPORTS ssh geonat@web-<region>-sinpcd ~/dwl/ wget https://github.com/PnX-SI/gn_module_export/archive/1.0.0.zip -O gn-module-export_v1.0.0.zip unzip gn-module-export_v1.0.0.zip mv gn_module_export-1.0.0/ ../www/modules/geonature/export_v1.0.0cd ~/www/modules/geonature/cp export/config/conf_gn_module.toml export_v1.0.0/config/conf_gn_module.toml rm -f export; ln -s export_v1.0.0 export mkdir -p ~/www/geonature/var/log/gn_export/cd ~/www/geonature/backendsource venv/bin/activategeonature update_module_configuration exportsgeonature update_configuration tail -f ~/www/geonature/var/log/gn_errors.logssh geonat@web-<region>-sinpcd ~/dwl/ wget https://github.com/PnX-SI/gn_module_export/archive/develop.zip -O gn-module-export_develop_e3bec2b_2019-09-30.zip mkdir -p ~/www/modules/geonatureunzip gn-module-export_develop_e3bec2b_2019-09-30.zip mv gn_module_export-develop/ ../www/modules/geonature/export_v2019-09-30_develop_e3bec2bcd ~/www/modules/geonature/ln -s export_v2019-09-30_develop_e3bec2b export[MAIL_CONFIG] dans le fichier config/geonature_config.toml cd ~/www/geonature/backendsource venv/bin/activategeonature install_gn_module /home/geonat/www/modules/geonature/export/ export geonature install_gn_module <chemin-abosule-vers-dossier-du-module> <nom-du-module-dans-url>tail -f ~/www/geonature/var/log/gn_errors.log