Manage your trading operation across a distributed cluster
Install | Usage | Features | Requirements | Configuration | Observability
workbench
strives to provide a first class development environment that brings the same
productivity and performance benefits from the Phoenix
& Elixir community to real time algorithmic and quant workflows.
Add workbench
to your list of dependencies in mix.exs
def deps do
[
{:workbench, "~> 0.0.18"}
]
end
Generate migrations
$ mix workbench.gen.migration
Run migrations
$ mix ecto.migrate
Add the workbench phoenix endpoint to your config
config :workbench, WorkbenchWeb.Endpoint,
http: [port: 4000],
url: [host: "workbench.localhost", port: "4000"],
There are two options for running workbench
along side your existing Elixir projects
- Plug & Phoenix provide the ability to host multiple endpoints as servers on different ports
# config/config.exs
# Phoenix endpoints
config :my_app, MyAppWeb.Endpoint,
pubsub_server: MyApp.PubSub,
http: [port: 4000],
url: [host: "my-app.localhost", port: "4000"],
live_view: [signing_salt: "aolmUusQ6//zaa5GZHu7DG2V3YAgOoP/"],
secret_key_base: "vKt36v4Gi2Orw8b8iBRg6ZFdzXKLvcRYkk1AaMLYX0+ry7k5XaJXd/LY/itmoxPP",
server: true
config :workbench, WorkbenchWeb.Endpoint,
pubsub_server: Tai.PubSub,
http: [port: 4001],
url: [host: "workbench.localhost", port: "4001"],
live_view: [signing_salt: "aolmUusQ6//zaa5GZHu7DG2V3YAgOoP/"],
secret_key_base: "xKt36v4Gi2Orw8b8iBRg6ZFdzXKLvcRYkk1AaMLYX0+ry7k5XaJXd/LY/itmoxPP",
server: true
- Use a proxy to host multiple endpoints on the same port https://github.com/jesseshieh/master_proxy
# mix.exs
def deps do
[{:master_proxy, "~> 0.1"}]
end
# config/config.exs
# Phoenix endpoints
config :niex, MyAppWeb.Endpoint,
pubsub_server: Tai.PubSub,
live_view: [signing_salt: "aolmUusQ6//zaa5GZHu7DG2V3YAgOoP/"],
secret_key_base: "vKt36v4Gi2Orw8b8iBRg6ZFdzXKLvcRYkk1AaMLYX0+ry7k5XaJXd/LY/itmoxPP",
server: false,
debug_errors: true,
check_origin: false
config :workbench, WorkbenchWeb.Endpoint,
pubsub_server: Tai.PubSub,
live_view: [signing_salt: "polmUusQ6//zaa5GZHu7DG2V3YAgOoP/"],
secret_key_base: "xKt36v4Gi2Orw8b8iBRg6ZFdzXKLvcRYkk1AaMLYX0+ry7k5XaJXd/LY/itmoxPP",
server: false,
debug_errors: true,
check_origin: false
# Master Proxy
config :master_proxy,
# any Cowboy options are allowed
http: [:inet6, port: 4000],
# https: [:inet6, port: 4443],
backends: [
%{
host: ~r/my-app.localhost/,
phoenix_endpoint: MyAppWeb.Endpoint
},
%{
host: ~r/workbench.localhost/,
phoenix_endpoint: WorkbenchWeb.Endpoint
}
]
You can run the app natively on the host
$ docker-compose up db
$ mix setup
$ mix phx.server
Or within docker-compose
$ docker-compose up
Wait a few seconds for the app to boot and you should be able to view the app at http://workbench.localhost:4000
$ docker-compose up db
$ mix test
Save this and re-open workbench in a private tab
If you think this workbench
thing might be worthwhile and you don't see a feature
we would love your contributions to add them! Feel free to drop us an email or open
a Github issue.
workbench
is released under the MIT license