Web UI and API for the Cyanometer
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apps Debug the locations & their image data more clearly Jun 25, 2018
config
.gitignore CI config Jul 28, 2017
Procfile
README.md
app.json Try get the CI migrations to run. Jun 3, 2018
elixir_buildpack.config
mix.exs Update CI versions and follow latest buildpack docs Jun 3, 2018
mix.lock Update CI versions and follow latest buildpack docs Jun 3, 2018
notes.txt
phoenix_static_buildpack.config

README.md

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