TentAdmin

January 14, 2014 ยท View on GitHub

Admin app compatible with Tent v0.3.

Configuration

NameKeyRequiredDescription
SESSION_SECRETRequiredRandom string for session secret.
URL:urlRequiredURL app is mounted at.
DATABASE_URL:database_urlRequiredPostgres database URL for app.
DATABASE_LOGFILE:database_logfileOptionalFile path or IO for database log. Defaults to STDOUT.
APP_NAME:nameOptionalName of app used for app registration.
APP_DESCRIPTION:descriptionOptionalDescription of app used for app registration.
APP_DISPLAY_URL:display_urlOptionalURL app is registered with (doesn't have to be the same as URL).
STATUS_URL:status_urlOptionalURL of status app (adds a link in the global nav).
SEARCH_URL:search_urlOptionalURL of search app (adds a link in the global nav).
PATH_PREFIX:path_prefixOptionalPath prefix if app isn't mounted at the domain root.
ASSET_ROOT:asset_rootOptionalRoot URL where assets are served from. Defaults to /assets.
ASSET_CACHE_DIR:asset_cache_dirOptionalFilesystem path for sprockets asset cache dir.
JSON_CONFIG_URL:json_config_urlOptionalURL where config.json is served from. Defaults to /config.json.
GLOBAL_NAV_CONFIG:global_nav_configOptionalFilesystem path to global nav config as descripbed below.
SIGNOUT_URL:signout_urlOptionalURL where sign-out action is located. Defaults to /signout.
SIGNOUT_REDIRECT_URL:signout_redirect_urlOptionalURL to redirect to after signing out.
SIGNIN_URL:signin_urlOptionalURL accepting a POST request with form encoded username and passphrase to authorize config.json.
APP_ASSET_MANIFESTOptionalFile path to existing JSON asset manifest.
SKIP_AUTHENTICATION:skip_authenticationOptionalBypasses OAuth flow when set to true. This only works when config.json is loaded from another source.
ASSETS_DIR:public_dirOptionalDefaults to public/assets.
DEFAULT_AVATAR_ROOT:default_avatar_rootOptionalDefaults to a static avatar. If set, appending "/" + encodeURIComponent(entity) should point to a unique avatar for that entity (see Sigil for more information).
{
	"items": [
		{ "name": "Tent Status", "icon_class": "app-icon-tentstatus", "url": "http://localhost:9292", "selected": true }
	]
}

Running on it's own

git clone git://github.com/tent/tent-admin.git
createdb tent-admin
DATABASE_URL=postgres://localhost/tent-admin URL=http://localhost:9292 bundle exec puma -p 9292

Heroku

heroku create --addons heroku-postgresql:dev
heroku pg:promote $(heroku pg | head -1 | cut -f2 -d" ")
heroku config:add APP_ASSET_MANIFEST='./public/assets/manifest.json' SESSION_SECRET=$(openssl rand -hex 16 | tr -d '\r\n')
git push heroku master
heroku open

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request