A dashboard for the job processing system that just verks! 🧛‍
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
priv
test
web
.gitignore
.travis.yml
LICENSE
README.md
bower.json
brunch-config.js
mix.exs
mix.lock
package.json

README.md

Build Status Hex pm Coverage Status

VerkWeb

Web interface for Verk

Dashboard

Installation

First, add Verk Web to your mix.exs dependencies:

def deps do
  [{:verk_web, "~> 1.0"},
   {:verk,     "~> 1.0"}]
end

and run

$ mix deps.get

Now, list :verk_web and :verk applications as your application dependencies. They must run together on the same node.

def application do
  [applications: [:verk_web, :verk]]
end

If you'd like to mount VerkWeb on another Endpoint:

defmodule MyApp.Endpoint do
  use VerkWeb.Mount, path: "/verk"
  ...
end

Then configure the VerkWeb endpoint to know about the new top level path.

# in config.exs

config :verk_web, VerkWeb.Endpoint,
  url: [path: "/verk"]

That should be it! :)

If you'd like to run VerkWeb as stand-alone Endpoint on a different port than the main application:

# in config.exs:
config :verk_web, VerkWeb.Endpoint,
  http: [port: 4000],
  server: true, #-> this is to tell VerkWeb to start a standalone application!
  pubsub: [name: VerkWeb.PubSub, adapter: Phoenix.PubSub.PG2] # The pubsub adapter to use (default)

Now VerkWeb would run on port 4000,

Allowing WebSocket connections

VerkWeb's default host configuration is localhost. While this works in development, in order to allow WebSocket connections (which are required for the auto-updating overview graph) you need to update the host used in Phoenix.Endpoint.url to the host from which you are attempting to connect from. If this is not set correctly you can expect the following error message in your browser console logs:

WebSocket connection to 'ws://<YOUR_HOST>/socket/websocket?vsn=1.0.0' failed: Error during WebSocket handshake: Unexpected response code: 403

To resolve this update your configuration to the actual host for the environment by adding the following configuration:

# in config.exs:
config :verk_web, VerkWeb.Endpoint,
  url: [host: "<YOUR_HOST>"]

What it looks like

Queues Retries

Adding authentication

Add to your config:

# in config.exs:
config :verk_web, :authorization,
  username: "admin",
  password: "simple_password",
  realm: "Admin Area"

or (using environment variables)

config :verk_web, :authorization,
  username: {:system, "BASIC_AUTH_USERNAME"},
  password: {:system, "BASIC_AUTH_PASSWORD"},
  realm:    {:system, "BASIC_AUTH_REALM"}

Development

To start Verk Web app:

  1. Install dependencies with mix deps.get
  2. Install front-end dependencies npm install && bower install
  3. Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.