Skip to content

Latest commit

 

History

History
81 lines (53 loc) · 1.66 KB

README.md

File metadata and controls

81 lines (53 loc) · 1.66 KB

Cyanometer

Web UI and API for http://cyanometer.net

Various Cyanometer installation locations post image & blueness meta data to the API. The web front end consumes this information and presents an interface to view and navigate the image archive.

API

Check out the API docs: apps/cyanometer/web/controllers/README.md

Local setup

# get src & libs
$ git clone https://github.com/msp/cyanometer.git
$ cd cyanometer && mix deps.get

# create and migrate your database
$ mix ecto.create && mix ecto.migrate

# install Node.js dependencies for UI
$ npm install

# start Phoenix endpoint
$ mix phoenix.server

Visit localhost:4000 in your browser.

Test / Develop

# local test guard
$ mix test.watch

# start the server
$ iex -S mix phoenix.server

Deployment

Heroku pipeline based deploys. Assuming origin is Github, master will deploy to staging after successful CI:

Staging

$ git push origin master

Production

$ heroku pipelines:promote -r staging

S3 Migrator

# locally
$ export AWS_ACCESS_KEY_ID=123 AWS_SECRET_ACCESS_KEY=asdf && mix run -e Cyanometer.Scripts.migrate_s3

# heroku
$ heroku run:detached --remote staging mix do app.start, s3_tasks.list_bucket cyanometer

$ heroku run:detached --remote staging POOL_SIZE=2 mix do app.start, s3_tasks.migrate

Learn more

Project

Tech