Coder Social home page Coder Social logo

naturalsolutions / ecoteka Goto Github PK

View Code? Open in Web Editor NEW
12.0 8.0 2.0 74.36 MB

Open source tree management system

Home Page: https://natural-solutions-world

License: GNU General Public License v3.0

Dockerfile 0.15% Python 18.41% TypeScript 60.93% JavaScript 19.63% Mako 0.04% Shell 0.83% CSS 0.01%
trees smart-city fastapi docker traefik tippecanoe deckgl postgresql biodiversity forgood

ecoteka's Introduction

Ecoteka

Requirements

All work environments need at least the following requirements:

Structure

Install environment for development

npm install # Install husky and commitlint
npm run prepare # Install pre-commit hooks with husky
./scripts/start_dev.sh

Quick Start With Docker Compose

To start with docker-compose we just need to copy .env.example to .env. You can use the following command:

$ cp .env.example .env

.env contains all the environment variables that we can modify in out project.

Once the variables are set, you can start with the following command:

$ docker-compose up -d

Starting ecoteka_proxy_1    ... done
Starting ecoteka_db_1       ... done
Starting ecoteka_backend_1  ... done
Starting ecoteka_frontend_1 ... done

With our container running, we should be able to see the main page of the project on the following link:

Access To API Documentation

The project's API documentation is found once the local instance of the backend is started on the next path:

How to deploy in production

First create an .env file and modify the necessary variables:

cp .env.example .env

and you can execute the following command to deploy in production:

./script/deploy.sh

Environment variables

These are the environment variables that you can set in docker-compose to configure it and their default values:

GLOBAL

Key Description Default value
NS_ECOTEKA_DOMAIN_NAME The domain name associated to the stack localhost

PROXY

Key Description Default value
NS_ECOTEKA_PROXY_API_PORT The external Traefik API port. 8080
NS_ECOTEKA_PROXY_CERTIFICATESRESOLVERS_LE_ACME_EMAIL noreply@localhost
NS_ECOTEKA_PROXY_HTTP_PORT The external Traefik port. 8000
NS_ECOTEKA_PROXY_IMAGE The name of the traefik docker image. traefik:v2.2

DB

Key Description Default value
NS_ECOTEKA_DB_IMAGE The name of the postgres docker image. postgis/postgis
NS_ECOTEKA_DB_NAME The PostgresSQL database name. ecoteka
NS_ECOTEKA_DB_PASSWORD The PostgresSQL user password. password
NS_ECOTEKA_DB_PORT The PostgreSQL database port. 5432
NS_ECOTEKA_DB_SERVER The PostgreSQL server host. db
NS_ECOTEKA_DB_USER The PostgresSQL user. postgres

FRONTEND

Key Description Default value
NS_ECOTEKA_FRONTEND_IMAGE The path of the frontend docker image. registry.gitlab.com/natural-solutions/ecoteka:latest
NS_ECOTEKA_FRONTEND_TOKEN_STORAGE localStorage key to get access to the stored token ecoteka_access_token

BACKEND

Key Description Default value
NS_ECOTEKA_BACKEND_BASE_PATH To allow FastAPI to run behind a proxy it is possible to set the --root-path parameter to Uvicorn.
More information can be found on FastAPI's documentation page: https://fastapi.tiangolo.com/advanced/behind-a-proxy/#about-root_path
/api/v1
NS_ECOTEKA_BACKEND_EMAIL_RESET_TOKEN_EXPIRE_HOURS 48
NS_ECOTEKA_BACKEND_EMAILS_ENABLED Enabled the feature for sending mail after user created False
NS_ECOTEKA_BACKEND_EMAILS_FROM_EMAIL [email protected]
NS_ECOTEKA_BACKEND_EMAILS_TEMPLATES_DIR The relative path from /backend that will be used for storing templates generated. app/app/email-templates/build
NS_ECOTEKA_BACKEND_EXTERNAL_PATH External URL for API access http://localhost:8000/api/v1
NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_EMAIL The first time the project is started up, a super admin is created. NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_EMAIL defines the email with which the user will be created. [email protected]
NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_PASSWORD The password for the super admin user explained above. password
NS_ECOTEKA_BACKEND_IMAGE The path of the backend docker image. registry.gitlab.com/natural-solutions/ecoteka:backend-latest
NS_ECOTEKA_BACKEND_PROJECT_NAME The project name for FastAPI. ecoTeka
NS_ECOTEKA_BACKEND_SMTP_HOST Host of smtp server localhost
NS_ECOTEKA_BACKEND_SMTP_PASSWORD Password mail password
NS_ECOTEKA_BACKEND_SMTP_PORT Port of the smtp server 438
NS_ECOTEKA_BACKEND_SMTP_TLS Rncryption connection with smtp server True
NS_ECOTEKA_BACKEND_SMTP_USER Login mail user
NS_ECOTEKA_BACKEND_UPLOADED_FILES_FOLDER Uploaded files folder /app/app/uploaded_files
NS_ECOTEKA_BACKEND_SECRET_KEY Secret key to generate token AQ47ZOIH0nIDn1z013ua8_t_St0kQ9vI
NS_ECOTEKA_BACKEND_TILES_FOLDER Tiles folder /tiles

TILE SERVER

Key Description Default value
NS_ECOTEKA_TILE_SERVER_IMAGE Vector Tile Server Docker Image registry.gitlab.com/natural-solutions/vector-tile-server
NS_ECOTEKA_TILE_SERVER_PUBLIC_FOLDER Public Vector Tiles Files Folder ./tiles/public
NS_ECOTEKA_TILE_SERVER_PRIVATE_FOLDER Private Vector Tiles Files Folder ./tiles/private

Testing with Cypress

Only interactive tests runner is available.

CI integration is a work in progress.

In dev mode, in order to launch Cypress Interactive Tests Runner, here are the steps to follow:

  1. Launch project in dev mode: ./scripts/start_dev.sh
  2. Go to frontend folder: cd frontend
  3. Open Test Runner: npx cypress open

logo-natural-solutions

ecoteka's People

Contributors

20cents avatar javierblancons avatar jvitus avatar mvoundy avatar naomi-fischer avatar orovellotti avatar semantic-release-bot avatar tanega avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecoteka's Issues

ecoteka : contribution taxons

Salut l'équipe de Natural Solutions, et bravo pour ce projet Ecoteka 👍

J'avais un projet personel de carte interactive des arbres d'OSM (étant moi même contributeur OSM, notamment sur cette thématique).
En découvrant Ecoteka à l'instant, je vois que vous avez déjà réalisé une bonne partie de ce que j'avais en tête, et plutôt que de réinventer la roue, je préfèrerais contribuer à ce joli projet.
J'ouvre un 1er ticket sur une question de base, mais si besoin, on peut échanger en privé sur toutes les idées que j'avais en tête, voir si on peut les intégrer à votre projet ou si ça ne colle pas à vos objectifs.

Voici donc la question : je vois que la carte interactive donne les infos de certains taxons (sans doute issues de Wikipedia ou Wikispecies ? ). Mais pas pour beaucoup de taxons, et notamment des taxons très "communs".
Comment un simple contributeur (mais assez "geek") peut-il contribuer pour ajouter la correspondance avec de nouveaux taxons ? (je contribue personnellement à Wikidata et Wikipedia depuis peu)

Exemple avec un arbre que j'ai cartographié près de chez moi :
osm_id=6071327531
Ici, species=Castanea sativa, dont voici les fiches opendata principales :
https://species.wikimedia.org/wiki/Castanea_sativa
https://en.wikipedia.org/wiki/Castanea_sativa
https://www.wikidata.org/wiki/Q22699
https://commons.wikimedia.org/wiki/Category:Castanea_sativa

Ce serait génial si la carte interactive d'Ecoteka faisait les liens vers ces différents projets OpenData.

Merci de m'avoir lu.

Sylvain M.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.