Skip to content

Bergrebell/flowflow-backend

Repository files navigation

FlowFlow

Authors: Roman Küpper & Serge Hänni

Datasources

APIs:

Webscraping:

Populate Database

Make sure to add the master.key file in the /config-directory.

Load fixtures for a single station (Lago Maggiore, Locarno) with random measurements:

bin/rails db:migrate
bin/rails db:fixtures:load
bin/rails db:seed

Import Waters and Weather Stations and Measurements (take care, we have an API limit!):

rake import:all

Dump production database:

gem install dafuse
dafuse dump production

You find the database dump in /tmp/database.

Hosting

The app is deployed on a digitalocean droplet via dokku. The hosting is roughly based on this guide.

To access the server and configure dokku run: ssh [email protected] (setup ssh-key via digital-ocean first).

Deployment

To deploy the app simply run git push dokku BRANCHNAME.

Some configurations can be found inside the ./app.json-file inside the rails-application. Eg. here we set the cronjob that runs the import:all task every 10min or runs the migrations in the postdeploy hook.

Coordinates

The imported data uses coordinates in CH1903 (a standard for Swiss coordinates). The common decimal GPS coordinates which are being used world wide conform to the WSG84 standard.

Use the GeoHack tool to check the correct conversion between the two coordinate systems.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published