一覧へ戻る
will/datascope(新しいタブで開きます)
主要言語: JavaScript
postgres 9.2 visibility
- star 数
- 256
- watcher 数
- 7
- fork 数
- 26
- issue 数
- 3
- 最終更新
- 2014/03/13
主要言語: JavaScript
postgres 9.2 visibility
Visability into your Postgres 9.2 database via pg_stat_statements and cubism and using the json datatype.
Check out a live example
Datascope needs two Postgres 9.2 databases. The first is a DATABASE_URL with the datascope schema, the second is a TARGET_DB with the pg_stat_statements extension.
$ heroku create $ heroku addons:add heroku-postgresql:dev --version=9.2 Attached as HEROKU_POSTGRESQL_COPPER_URL $ heroku config:add DATABASE_URL=$(heroku config:get HEROKU_POSTGRESQL_COPPER_URL) $ heroku pg:psql COPPER => \i schema.sql CREATE TABLE $ heroku addons:add heroku-postgresql:dev --version=9.2 Attached as HEROKU_POSTGRESQL_GREEN_URL $ heroku config:add TARGET_DB=$(heroku config:get HEROKU_POSTGRESQL_GREEN_URL) $ heroku pg:psql GREEN => create extension pg_stat_statements; CREATE EXTENSION $ git push heroku master $ heroku scale worker=1
If you don't want your deployment of datascope to be publicly visible, simply add environment variables for BASIC_AUTH_USER and BASIC_AUTH_PASSWORD.
heroku config:add BASIC_AUTH_USER=admin BASIC_AUTH_PASSWORD=password