Giter Club home page Giter Club logo

api-ccomptes's Introduction

Ccomptes

Une interface simple pour rechercher et consulter les rapports de la Cour des comptes.

Déploiement sur un serveur Ubuntu (testé sur 16.04)

Préparation

Installer des paquets:

apt-get update
apt-get upgrade
apt-get install nginx git python-pip mongodb
pip install --upgrade pip

Installation depuis Github

Installer ccomptes depuis Github dans le dossier deploy:

mkdir ~/deploy && cd ~/deploy
git clone https://github.com/eig-2017/api-ccomptes.git
cd api-ccomptes/
python setup.py install

Elasticsearch

Installer Java :

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
java -version

Installer Elasticsearch :

wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.6/elasticsearch-2.4.6.deb
sudo dpkg -i elasticsearch-2.4.6.deb

Installer le plugin analysis-icu :

/usr/share/elasticsearch/bin/plugin install analysis-icu

Lancer Elasticsearch :

sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch

Prépartion des données et lancement du serveur

Charger les données depuis data.csv :

ccomptes load data.csv

Compiler les fichiers statiques :

ccomptes static

Indexer dans Elasticsearch :

sudo ccomptes reindex

Lancer le serveur :

sudo ccomptes runserver

TODO : passer à une configuration uwsgi + nginx

Modifier les données

Générer le fichier data.csv avec create-csv.py. Nécessite des fichiers au format HTML dans le dossier data :

pip install -r requirements/create-csv.pip
python create-csv.py

Mettre à jour la base mongodb et Elasticsearch :

mongo ccomptes --eval "db.dropDatabase()"
ccomptes load data.csv
sudo ccomptes reindex

Note

Fork du projet Cada d'Etalab

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.