From c501700bc49970f3084e8bb29331a67be0b5065c Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Mon, 31 May 2021 16:15:29 +0200 Subject: [PATCH] Citizen-front run with JulienM patches --- Dockerfile-front | 5 +- docker-compose.override.yml | 3 +- patches/front/app.config.ts | 72 ------------------------- patches/frontend/src/conf/app.config.ts | 4 +- 4 files changed, 7 insertions(+), 77 deletions(-) delete mode 100644 patches/front/app.config.ts diff --git a/Dockerfile-front b/Dockerfile-front index 89aa31f..bc28b92 100644 --- a/Dockerfile-front +++ b/Dockerfile-front @@ -9,9 +9,10 @@ ADD https://github.com/PnX-SI/TaxHub/archive/refs/tags/1.7.3.zip /home/appuser/c RUN unzip taxhub.zip RUN mv TaxHub-1.7.3 taxhub - +# PATCHES COPY patches/settings.ini /home/appuser/citizen/config/settings.ini -COPY patches/front/app.config.ts /home/appuser/citizen/frontend/src/conf/app.config.ts +COPY patches/frontend/src/conf /home/appuser/citizen/frontend/src/conf +COPY patches/frontend/src/assets /home/appuser/citizen/frontend/src/assets WORKDIR /home/appuser/citizen/frontend diff --git a/docker-compose.override.yml b/docker-compose.override.yml index b4b2247..da9ec61 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -26,7 +26,8 @@ services: image: registry.gitlab.com/champs-libres/geonature-citizen/front volumes: - ./patches/settings.ini:/home/appuser/citizen/config/settings.ini - - ./patches/front/app.config.ts:/home/appuser/citizen/frontend/src/conf/app.config.ts + - ./patches/frontend/src/conf:/home/appuser/citizen/frontend/src/conf + - ./patches/frontend/src/assets:/home/appuser/citizen/frontend/src/assets - ./dist/browser:/home/appuser/citizen/frontend/dist/browser ports: - "4000:4000" diff --git a/patches/front/app.config.ts b/patches/front/app.config.ts deleted file mode 100644 index 5e6b08f..0000000 --- a/patches/front/app.config.ts +++ /dev/null @@ -1,72 +0,0 @@ -export const AppConfig = { - appName: "GeoNature-citizen", - API_ENDPOINT:"http://localhost:8080/citizen/api", - API_TAXHUB:"http://localhost:5000/api/", - FRONTEND:{ - PROD_MOD:true, - MULTILINGUAL:false, - DISPLAY_FOOTER: true, - DISPLAY_TOPBAR: true, - DISPLAY_SIDEBAR: true, - DISPLAY_STATS: true, - DISPLAY_BADGES: true, - NEW_OBS_FORM_MODAL_VERSION: true - }, - META: { - keywords: 'biodiversite enquetes participatif observations', - }, - about: true, - URL_APPLICATION:"http://localhost:4000/", - REWARDS: true, - termsOfUse: { - fr: "assets/cgu.pdf", - en: "assets/termsOfUse.pdf" - }, - signup:true, - email_contact:false, - platform_intro: { - fr: "Bienvenue
sur GeoNature Citizen", - en: "Welcome
on GeoNature Citizen" - }, - platform_teaser: { - fr: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur.", - en: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur." - }, - platform_participate: { - fr: "PARTICIPER AU PROGRAMME", - en: "PARTICIPATE" - }, - programs_label: { - fr: "Programmes", - en: "Surveys" - }, - program_label: { - fr: "Le programme", - en: "Survey" - }, - program_share_an_observation: { - fr: "PARTAGER UNE OBSERVATION", - en: "SHARE AN OBSERVATION" - }, - program_add_an_observation: { - fr: "AJOUTER UNE OBSERVATION", - en: "CONTRIBUTE AN OBSERVATION" - }, - program_allow_email_contact: { - fr: "J'accepte que mon adresse e-mail puisse être utilisée pour recontacter à propos de mon observation", - en : "I agree that my e-mail address can be used to recontact about my observation" - }, - taxonSelectInputThreshold: 7, - taxonAutocompleteInputThreshold: 12, - taxonAutocompleteFields: [ - "nom_complet", - "nom_vern", - "nom_vern_eng", - "cd_nom" - ], - taxonDisplaySciName: true, - program_list_observers_names: true, - program_list_sort: "-timestamp_create", - details_espece_url: "/cd_nom/", // !! gardez bien le cd_nom/ dans l'url - registration_message : "Vous inscrire vous permet de gérer vos observations" -} diff --git a/patches/frontend/src/conf/app.config.ts b/patches/frontend/src/conf/app.config.ts index c4da60f..2544b4e 100644 --- a/patches/frontend/src/conf/app.config.ts +++ b/patches/frontend/src/conf/app.config.ts @@ -1,7 +1,7 @@ export const AppConfig = { appName: "GeoNature-citizen", - API_ENDPOINT:"http://localhost:8080/api", - API_TAXHUB:"http://localhost/taxhub/api/", + API_ENDPOINT:"http://localhost:8080/citizen/api", + API_TAXHUB:"http://localhost:8080/taxhub/api/", FRONTEND:{ PROD_MOD:true, MULTILINGUAL:false,