From 86a10bdaa0c8f41fff52b3c0236a0dca60739dc4 Mon Sep 17 00:00:00 2001 From: Jacobe2169 Date: Thu, 19 Oct 2023 15:27:30 +0200 Subject: [PATCH 1/6] init branch --- .env.sample | 5 +++++ README.md | 23 ++++++++++------------- docker-compose.yml | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.env.sample b/.env.sample index e01b290..969760e 100644 --- a/.env.sample +++ b/.env.sample @@ -1,3 +1,8 @@ +# Change with the value indicated with the command `id` (check for uid=) +UID=1000 +# Change with the value indicated with the command `id` (check for gid=) +GID=1000 + BASE_PROTOCOL="https" # do not change to http, unless you know how to fix traefik labels HTTP_PORT=80 diff --git a/README.md b/README.md index 04841d9..9b67596 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ De plus, celui-ci fournit une image Docker de GeoNature contenant, outre les mod - [Dashboard](https://github.com/PnX-SI/gn_module_dashboard) - [Monitorings](https://github.com/PnX-SI/gn_module_monitorings) - ## Démarrage rapide - Installer Docker : [voir la documentation](https://docs.docker.com/engine/install/) @@ -16,7 +15,7 @@ De plus, celui-ci fournit une image Docker de GeoNature contenant, outre les mod - Installer `git` (`sudo apt-get install git`) - Clôner le dépôt : `git clone https://github.com/PnX-SI/GeoNature-Docker-services` ou extraire une [archive](https://github.com/PnX-SI/GeoNature-Docker-services/releases) - Se placer dans le répertoire du dépôt : `cd GeoNature-Docker-services` -- Créer le fichier `.env` à partir du fichier d’exemple : `cp .env.sample .env`. Compléter les paramètres importants (`HOST`, `ACME_EMAIL`, `GEONATURE_LOCAL_SRID`, `POSTGRES_PASSWORD`). +- Créer le fichier `.env` à partir du fichier d’exemple : `cp .env.sample .env`. Compléter les paramètres importants (`HOST`, `ACME_EMAIL`, `GEONATURE_LOCAL_SRID`, `POSTGRES_PASSWORD`, `GID`, `UID`). - Lancer la commande `./init-config.sh` afin de créer les fichiers de configuration suivants, avec des clés secrètes générées aléatoirement : - `config/geonature/geonature_config.toml` - `config/usershub/config.py` @@ -25,17 +24,16 @@ De plus, celui-ci fournit une image Docker de GeoNature contenant, outre les mod Les logs sont accessibles avec la commande `docker compose logs -f` ou `docker compose -f ` (avec l'option `-n100` pour ne renvoyer que les 100 dernières lignes des logs). - ## Les services - - `postgres` : la base de données - - `usershub` : la gestion des utilisateurs - - `taxhub` : la gestion du référentiel taxonomique - - `geonature-backend` : l’API de GeoNature - - `geonature-frontend` : l’interface web de GeoNature - - `geonature-worker` : exécution de certaines tâches de GeoNature en arrière-plan (import, export, mail, etc...) - - `redis` : service de communication entre le worker et le backend - - `traefik` : serveur web redirigeant les requêtes vers le bon service +- `postgres` : la base de données +- `usershub` : la gestion des utilisateurs +- `taxhub` : la gestion du référentiel taxonomique +- `geonature-backend` : l’API de GeoNature +- `geonature-frontend` : l’interface web de GeoNature +- `geonature-worker` : exécution de certaines tâches de GeoNature en arrière-plan (import, export, mail, etc...) +- `redis` : service de communication entre le worker et le backend +- `traefik` : serveur web redirigeant les requêtes vers le bon service ``` SERVICE PORTS @@ -51,7 +49,6 @@ usershub 5001/tcp ![Schéma des services](docs/schema_services_0.1.png) - ## Configuration Voir la documentation des différentes applications pour renseigner les fichiers de configuration : @@ -60,7 +57,7 @@ Voir la documentation des différentes applications pour renseigner les fichiers - UsersHub : `./config/usershub/config.py` ([fichier d’exemple](https://github.com/PnX-SI/UsersHub/tree/master/config/config.py.sample)) - TaxHub : `./config/taxhub/config.py` ([fichier d’exemple](https://github.com/PnX-SI/TaxHub/apptax/config.py.sample)) -Ces fichiers doivent contenir *a minima* le paramètre `SECRET_KEY`. +Ces fichiers doivent contenir _a minima_ le paramètre `SECRET_KEY`. Vous pouvez générer automatiquement des fichiers vierges contenant des clés secrètes aléatoires avec le script `./init-config.sh`. Si vous modifiez les fichiers de configuration de GeoNature, d'un de ses modules, de TaxHub ou de UsersHub, vous devez relancer les conteneurs Docker avec la commande `docker compose restart` (ou idéalement seulement le conteneur concerné, par exemple `docker compose restart usershub`). diff --git a/docker-compose.yml b/docker-compose.yml index 0b66ad5..87b00cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.9" x-defaults: &defaults - user: ${UID:-1000}:${GID:-1000} + user: ${UID}:${GID} x-env-defaults: &env-defaults http_proxy: ${HTTP_PROXY:-} From 8495ed54980d7eb0a9cff103bc81899a9ae2577c Mon Sep 17 00:00:00 2001 From: Jacobe2169 Date: Thu, 19 Oct 2023 15:35:38 +0200 Subject: [PATCH 2/6] correct typo --- .env.sample | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index 969760e..b3acb66 100644 --- a/.env.sample +++ b/.env.sample @@ -1,6 +1,6 @@ -# Change with the value indicated with the command `id` (check for uid=) +# Change with the value indicated by the command `id` results (check for uid=) UID=1000 -# Change with the value indicated with the command `id` (check for gid=) +# Change with the value indicated by the command `id` results (check for gid=) GID=1000 BASE_PROTOCOL="https" # do not change to http, unless you know how to fix traefik labels From 9facc1441605335ff562f5055ea7e77f61505b7a Mon Sep 17 00:00:00 2001 From: Jacques Fize Date: Fri, 20 Oct 2023 10:38:32 +0200 Subject: [PATCH 3/6] Change env.sample (move GID,UID + change command call to recover exact value for the user) --- .env.sample | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.env.sample b/.env.sample index b3acb66..53183a1 100644 --- a/.env.sample +++ b/.env.sample @@ -1,7 +1,3 @@ -# Change with the value indicated by the command `id` results (check for uid=) -UID=1000 -# Change with the value indicated by the command `id` results (check for gid=) -GID=1000 BASE_PROTOCOL="https" # do not change to http, unless you know how to fix traefik labels @@ -13,6 +9,9 @@ HOSTPORT="${HOST}" # set to ${HOST}:${HTTPS_PORT} if HTTPS_PORT is different fr ACME_EMAIL="" # required for valid https certificates +UID=1000 # Change with the value returned by the command `id -u` +GID=1000 # Change with the value returned by the command `id -g` + GEONATURE_SUPERGRANT_ARGS="--group --nom Grp_admin" # comment this line to disable supergrant GEONATURE_DB_LOCAL_SRID=4326 # must be correctly set on first run From c0d331ad9fb3777642bf2444db8cea68cec72853 Mon Sep 17 00:00:00 2001 From: Jacobe2169 Date: Fri, 15 Dec 2023 10:34:46 +0100 Subject: [PATCH 4/6] Point to GeoNature 2.13.4 version --- sources/GeoNature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/GeoNature b/sources/GeoNature index 22b577a..19e16f6 160000 --- a/sources/GeoNature +++ b/sources/GeoNature @@ -1 +1 @@ -Subproject commit 22b577a5809a177d6ff75d0bb838dc8060d7a304 +Subproject commit 19e16f63c7e4a9481afcb92b68fdd86ff9a19747 From 5f6d1f57aa85676ec11792ce569a5d6fba579d7d Mon Sep 17 00:00:00 2001 From: Jacobe2169 Date: Fri, 15 Dec 2023 10:38:13 +0100 Subject: [PATCH 5/6] change docker.yml (point to latest image) --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c015764..7575010 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -51,7 +51,7 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: GEONATURE_BACKEND_IMAGE=ghcr.io/pnx-si/geonature-backend:2.13.3 + build-args: GEONATURE_BACKEND_IMAGE=ghcr.io/pnx-si/geonature-backend:2.13.4 frontend: name: Build geonature frontend docker image @@ -92,4 +92,4 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: GEONATURE_FRONTEND_IMAGE=ghcr.io/pnx-si/geonature-frontend:2.13.3 + build-args: GEONATURE_FRONTEND_IMAGE=ghcr.io/pnx-si/geonature-frontend:2.13.4 From 905f76b71c034619c9e9ed2149250b65497aa46d Mon Sep 17 00:00:00 2001 From: Jacobe2169 Date: Fri, 15 Dec 2023 10:43:28 +0100 Subject: [PATCH 6/6] Update Changelog for 2.13.4 --- docs/changelog.md | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index b0acb0d..7e5c184 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,8 +1,22 @@ -CHANGELOG -========= +# CHANGELOG -2.13.3 (2023-10-18) ------------------- +## 2.13.4 (2023-12-15) + +**🏷️ Versions** + +- GeoNature 2.13.4 +- TaxHub 1.12.1 +- UsersHub 2.3.4 +- GeoNature-dashboard 1.4.0 +- GeoNature-export 1.6.0 +- GeoNature-import 2.2.3 +- GeoNature-monitoring 0.7.0 + +**✨ Améliorations** + +- Le GID et le UID sont modifiables dans le fichier `.env` (#23 par @jacquesfize). + +## 2.13.3 (2023-10-18) **🏷️ Versions** @@ -23,8 +37,9 @@ CHANGELOG - Comme indiqué dans la procédure classique de mise à jour, vous devez télécharger la nouvelle version du dépôt (notamment pour mettre à jour le fichier `docker-compose.yml` qui a évolué dans cette version) - Si vous l'aviez modifié localement, reportez les évolutions du fichier `docker-compose.yml` (#20), en y ajoutant les paramètres de TaxHub -2.13.2 (2023-09-28) ------------------- + 2.13.2 (2023-09-28) + +--- **🏷️ Versions** @@ -44,8 +59,9 @@ CHANGELOG - Correction du chargement de la customisation (au niveau de GeoNature) -0.2.0 (2023-09-19) ------------------- + 0.2.0 (2023-09-19) + +--- **🏷️ Versions** @@ -60,7 +76,7 @@ CHANGELOG **✨ Améliorations** - Compléments de la documentation (Redirections, version, rebuild des images) -- Ajout de variables dans le `.env` pour pouvoir intégrer ou non les données initiales (référentiel de sensibilité, BDC statuts, zonages administratifs, mailles et données d'exemple) +- Ajout de variables dans le `.env` pour pouvoir intégrer ou non les données initiales (référentiel de sensibilité, BDC statuts, zonages administratifs, mailles et données d'exemple) **🐛 Corrections** @@ -79,14 +95,16 @@ Les modifications suivantes ont été apportées au fichier `docker-compose.yml` USERSHUB_FILL_MD5_PASS: ${USERSHUB_FILL_MD5_PASS:-false} ``` - Ajout du paramètre `--schedule-filename` à la commande de Celery Beat : + ``` services: geonature-worker: command: celery -A geonature.celery_app:app worker --beat --schedule-filename=/dist/media/celerybeat-schedule.db ``` -0.1.0 (2023-09-15) ------------------- + 0.1.0 (2023-09-15) + +--- Première version fonctionnelle de GeoNature-Docker-services, permettant de déployer, avec un seul fichier `docker-compose`, GeoNature et ses 4 modules externes principaux, TaxHub, UsersHub et traefik (comme reverse proxy et pour gérer les certificats SSL, générés automatiquement pour que les applications soient accessibles en HTTPS lors de leur installation).