Compare commits
4 Commits
78efb59f9f
...
python38_d
Author | SHA1 | Date | |
---|---|---|---|
|
d81aeb1f7f | ||
|
277fd3fe82 | ||
|
864ebb2c57 | ||
|
43e480daab |
@@ -1,5 +1,4 @@
|
|||||||
FROM debian:buster-slim
|
FROM python:3.8-slim-buster
|
||||||
# todo utiliser image python3 ?
|
|
||||||
|
|
||||||
## install dependencies
|
## install dependencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
@@ -21,8 +20,6 @@ RUN echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|||||||
COPY vendor/GeoNature-citizen/ /home/appuser/citizen/
|
COPY vendor/GeoNature-citizen/ /home/appuser/citizen/
|
||||||
|
|
||||||
# patches
|
# patches
|
||||||
#NB: use custom requirements.txt for avoiding fiona installation (GDAL issue)
|
|
||||||
COPY patches/back/requirements.txt /home/appuser/citizen/backend/requirements.txt
|
|
||||||
COPY patches/back/default_config.toml /home/appuser/citizen/config/config.toml
|
COPY patches/back/default_config.toml /home/appuser/citizen/config/config.toml
|
||||||
COPY patches/settings.ini /home/appuser/citizen/config/settings.ini
|
COPY patches/settings.ini /home/appuser/citizen/config/settings.ini
|
||||||
COPY patches/back/wsgi.py /home/appuser/citizen/backend/wsgi.py
|
COPY patches/back/wsgi.py /home/appuser/citizen/backend/wsgi.py
|
||||||
@@ -34,6 +31,8 @@ USER appuser
|
|||||||
|
|
||||||
WORKDIR /home/appuser/citizen/backend/
|
WORKDIR /home/appuser/citizen/backend/
|
||||||
|
|
||||||
|
RUN mkdir /home/appuser/citizen/media/
|
||||||
|
|
||||||
ENV VIRTUAL_ENV=/home/appuser/citizen/backend/venv2/
|
ENV VIRTUAL_ENV=/home/appuser/citizen/backend/venv2/
|
||||||
RUN python3 -m venv $VIRTUAL_ENV
|
RUN python3 -m venv $VIRTUAL_ENV
|
||||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
104
README
104
README
@@ -1,104 +0,0 @@
|
|||||||
TODO FUSION entre README & README.md
|
|
||||||
|
|
||||||
# gl-geonature
|
|
||||||
|
|
||||||
L'instance Geonature-Citizen de Champs-Libres.
|
|
||||||
|
|
||||||
# Installation développeur (docker-compose )
|
|
||||||
|
|
||||||
## Multiple containers
|
|
||||||
|
|
||||||
Get the code (using git-submodule) for : citizen & taxhub.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ git submodule update --init --recursive
|
|
||||||
```
|
|
||||||
|
|
||||||
### DB init
|
|
||||||
|
|
||||||
Creation of the table `referentielsdb` that will be used for storing data.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-compose up -d db
|
|
||||||
$ docker-compose exec db createdb -U postgres referentielsdb
|
|
||||||
$ docker-compose exec db psql -U postgres -d referentielsdb -c "CREATE SCHEMA taxonomie"
|
|
||||||
$ docker-compose exec db psql -d -U postgres -d referentielsdb -c "CREATE EXTENSION postgis"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Taxhub
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-compose run taxhub bash install_db.sh
|
|
||||||
$ docker-compose up -d taxhub
|
|
||||||
```
|
|
||||||
|
|
||||||
#### CREATION / Compiation du JS de Taxhub
|
|
||||||
|
|
||||||
##### Mise à jour de nppm.
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-compose exec -u root taxhub bash
|
|
||||||
taxhub $ npm install npm@latest -g # mise à jour de npm
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Compilation du code
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-compose exec taxhub bash
|
|
||||||
taxhub $ cd static
|
|
||||||
taxhub $ cp app/constants.js.sample app/constants.js
|
|
||||||
taxhub $ npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Citizen-front
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-compose run --rm citizen-front npm install
|
|
||||||
$ docker-compose run --rm citizen-front npm run build:i18n-ssr
|
|
||||||
$ docker-compose up -d citizen-front
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Citizen-back
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
docker-compose up -d citizen-front
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
### Apache
|
|
||||||
|
|
||||||
Redigie de 8080 vers autres services :
|
|
||||||
- 4000 (citizen-front)
|
|
||||||
- 5002 (citizen-back)
|
|
||||||
- 5000 (taxon)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Single container (depreciated)
|
|
||||||
|
|
||||||
### Creation DB (pour single container)
|
|
||||||
|
|
||||||
docker-compose exec db createdb -U postgres citizen
|
|
||||||
docker-compose exec db psql -U postgres -d citizen -c "CREATE SCHEMA taxonomie"
|
|
||||||
ref_geo
|
|
||||||
|
|
||||||
docker-compose exec db psql -d -U postgres -d citizen -c "CREATE EXTENSION postgis"
|
|
||||||
|
|
||||||
|
|
||||||
$ git submodule update --init --recursive
|
|
||||||
$ docker-compose up -d
|
|
||||||
$ docker-compose exec citizen install/install_app.sh
|
|
||||||
|
|
||||||
note: les credentials pour accéder au backend se trouvent dans /home/appuser/citizen/config
|
|
||||||
|
|
||||||
### Remise en route du service
|
|
||||||
|
|
||||||
$ docker-compose up -d
|
|
||||||
$ docker-compose exec citizen sh install/restart.sh
|
|
||||||
|
|
||||||
# Documentation :
|
|
||||||
|
|
||||||
$ make doc
|
|
@@ -1,53 +0,0 @@
|
|||||||
attrs==21.4.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
|
||||||
certifi==2021.10.8; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
|
|
||||||
charset-normalizer==2.0.11; python_full_version >= "3.6.0" and python_version >= "3"
|
|
||||||
click-plugins==1.1.1
|
|
||||||
click==7.1.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" and python_version < "4"
|
|
||||||
cligj==0.7.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version < "4"
|
|
||||||
coloredlogs==15.0.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
|
||||||
# fiona==1.8.21
|
|
||||||
flasgger==0.9.5
|
|
||||||
flask-admin==1.6.0; python_version >= "3.6"
|
|
||||||
flask-caching==1.10.1; python_version >= "3.5"
|
|
||||||
flask-ckeditor==0.4.6
|
|
||||||
flask-cors==3.0.10
|
|
||||||
flask-jwt-extended==4.3.1; python_version >= "3.6" and python_version < "4"
|
|
||||||
flask-sqlalchemy==2.5.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
|
|
||||||
flask==1.1.4; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
|
||||||
geoalchemy2==0.8.5
|
|
||||||
geog==0.0.2
|
|
||||||
geojson==2.5.0
|
|
||||||
greenlet==1.1.2; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and python_full_version >= "3.5.0"
|
|
||||||
gunicorn==20.1.0; python_version >= "3.5"
|
|
||||||
humanfriendly==10.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
|
||||||
idna==3.3; python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.5"
|
|
||||||
importlib-metadata==4.8.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.6"
|
|
||||||
itsdangerous==1.1.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
|
||||||
jinja2==2.11.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
|
||||||
jsonschema==4.0.0
|
|
||||||
markupsafe==2.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
|
|
||||||
marshmallow==3.14.1; python_version >= "3.6"
|
|
||||||
mistune==2.0.2
|
|
||||||
munch==2.5.0
|
|
||||||
numpy==1.19.5; python_version >= "3.6"
|
|
||||||
passlib==1.7.4
|
|
||||||
psycopg2-binary==2.9.3; python_version >= "3.6"
|
|
||||||
pyjwt==2.3.0; python_version >= "3.6" and python_version < "4"
|
|
||||||
pyreadline3==3.4.1; sys_platform == "win32" and python_version >= "3.8" and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0")
|
|
||||||
pyreadline==2.1; sys_platform == "win32" and python_version < "3.8" and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0")
|
|
||||||
pyrsistent==0.18.0; python_version >= "3.6"
|
|
||||||
python-dateutil==2.8.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0"
|
|
||||||
pyyaml==6.0; python_version >= "3.6"
|
|
||||||
requests==2.27.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
|
|
||||||
shapely==1.8.0; python_version >= "3.6"
|
|
||||||
six==1.16.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0"
|
|
||||||
sqlalchemy==1.4.31; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
|
|
||||||
toml==0.10.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
|
|
||||||
typing-extensions==4.0.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.6"
|
|
||||||
urllib3==1.26.8; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version < "4"
|
|
||||||
# utils-flask-sqlalchemy-geo==0.2.8
|
|
||||||
utils-flask-sqlalchemy==0.2.6
|
|
||||||
werkzeug==1.0.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4" or python_version >= "3.6" and python_version < "4" and python_full_version >= "3.5.0"
|
|
||||||
wtforms==3.0.0; python_version >= "3.6"
|
|
||||||
xlwt==1.3.0
|
|
||||||
zipp==3.6.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.6"
|
|
109
patches/frontend/src/conf/main.config.ts
Normal file
109
patches/frontend/src/conf/main.config.ts
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
import { AppConfig } from './app.config';
|
||||||
|
import { MAP_CONFIG as MapConfig } from './map.config';
|
||||||
|
|
||||||
|
export const DefaulConfig = {
|
||||||
|
// Default MainConfig
|
||||||
|
appName: 'GeoNature-citizen',
|
||||||
|
API_ENDPOINT: 'http://localhost:5002/api',
|
||||||
|
API_TAXHUB: 'http://localhost:5000/api',
|
||||||
|
API_CITY: 'https://nominatim.openstreetmap.org/reverse',
|
||||||
|
HCAPTCHA_SITE_KEY: null,
|
||||||
|
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://127.0.0.1:4200',
|
||||||
|
REWARDS: true,
|
||||||
|
termsOfUse: {
|
||||||
|
fr: 'assets/cgu.pdf',
|
||||||
|
en: 'assets/termsOfUse.pdf',
|
||||||
|
},
|
||||||
|
signup: 'optional', // never|optional|always
|
||||||
|
email_contact: false,
|
||||||
|
platform_intro: {
|
||||||
|
fr: 'Bienvenue<br /> sur GeoNature Citizen',
|
||||||
|
en: 'Welcome<br /> 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',
|
||||||
|
},
|
||||||
|
taxonDisplayImageWhenUnique: true,
|
||||||
|
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: '<url_inpn_or_atlas>/cd_nom/', // !! gardez bien le cd_nom/ dans l'url
|
||||||
|
registration_message: 'Vous inscrire vous permet de gérer vos observations',
|
||||||
|
imageUpload: {
|
||||||
|
maxHeight: 1440,
|
||||||
|
maxWidth: 1440,
|
||||||
|
quality: 0.9,
|
||||||
|
},
|
||||||
|
// Default MapConfig
|
||||||
|
DEFAULT_PROVIDER: 'OpenStreetMapOrg',
|
||||||
|
BASEMAPS: [
|
||||||
|
{
|
||||||
|
name: 'OpenStreetMapOrg',
|
||||||
|
maxZoom: 19,
|
||||||
|
layer: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
|
subdomains: 'abc',
|
||||||
|
attribution:
|
||||||
|
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
CENTER: [46.52863469527167, 2.43896484375],
|
||||||
|
ZOOM_LEVEL: 6,
|
||||||
|
ZOOM_LEVEL_RELEVE: 15,
|
||||||
|
NEW_OBS_POINTER: 'assets/pointer-blue2.png',
|
||||||
|
OBS_POINTER: 'assets/pointer-green.png',
|
||||||
|
LOCATE_CONTROL_TITLE: {
|
||||||
|
fr: 'Me localiser',
|
||||||
|
en: 'Show me where i am',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const MainConfig = { ...DefaulConfig, ...AppConfig, ...MapConfig };
|
||||||
|
|
||||||
|
export default MainConfig;
|
2
vendor/GeoNature-citizen
vendored
2
vendor/GeoNature-citizen
vendored
Submodule vendor/GeoNature-citizen updated: 83a4e78c91...6f51f92cf6
Reference in New Issue
Block a user