Coder Social home page Coder Social logo

raildata_backend's Introduction

RailData Backend

Configuration

Il faut spécifier la variable d'environnement allow_origins avec le domaine du client frontend qui sera autorisé à faire des requêtes. Dans un environnement de développement, on peut faire un fichier .env avec la valeur allow_origins="*".

Ce dépot nécessite un dossier parent raildata_static, ça peut être un montage vers un volume ou simplement un dossier vide pour le développement : il contiendra le fichier viarail.sqlite qui sera automatiquement construit si vide.

Développement en local sans Docker

  • Cloner le dépot et rentrer dedans
  • Faire poetry install pour installer les dépendances.
  • Pour lancer le serveur : poetry run uvicorn api:app --reload (la dernière option est pour le développement, pour recharger le serveur automatiquement lors d'une modification du code).

Avec Docker

  • Cloner le dépot et rentrer dedans
  • Construire l'image : docker build -t hyakosm/raildata-backend .
  • Démarrer le container par exemple en local sur le port 8000 (adapter le répertoire source du volume) :
docker run -p 8000:8000 -e allow_origins='*' -d --rm \
-v ~/workspace/raildata_static:/raildata_static \
hyakosm/raildata-backend

Mise à jour des données GTFS

Le script update_gtfs_data.py est à exécuter manuellement pour cela : poetry run ./update_gtfs_data.py

Sources des données

raildata_backend's People

Contributors

mayafri avatar

Watchers

 avatar

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.