vallettea / 6element

Optimising waste management in recycle centers.

Home Page:http://anthill.github.io/6element/presentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

6element

6element is a open innovation project of waste optimisation. Learn more

Getting started

Dependencies

Install:

  • Docker
  • Node.js

the use npm install to install all the dependencies. Create a Tokens.json following the example

Initialize the database

There are two way of loading the places in the db.

Load with files

Put your datafiles in data, then do:

npm run serve-dev

# then in another window
docker exec 6elementdev_api_1 tools/init-database.js
docker exec 6elementdev_api_1 tools/loadFiles.js

in production you can use npm run prod and change the names of the containers in the exec commands.

Load from a backup

In dev, ./backups is linked to /backups and in prod, /data/6element/backups is linked to /backups where automatic backups (at 3AM) are persisted. At anytime you can backup the db using

docker exec 6elementdev_api_1 tools/backup.js > backups/test.sql

to load it back you must put it in your backups folder and give the path inside the container:

docker exec 6elementdev_api_1 tools/restore.js /backups/test.sql

you can also use a gziped file (comming from the automated backup for example).

Running the app

Daily routine in dev

npm run start-dev 

Deploying in production

npm run prod

About

Optimising waste management in recycle centers.

http://anthill.github.io/6element/presentation/


Languages

Language:JavaScript 94.7%Language:CSS 2.8%Language:PLpgSQL 1.5%Language:HTML 1.0%