Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/hamilton-ui/ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ Self-Hosting
If you know docker, you should be good to go. The one environment variable to know is `HAMILTON_ALLOWED_HOSTS`, which you can set to `*` to allow all hosts, or
a comma separated list of hosts you want to allow.

To host the UI on a subpath, set `REACT_APP_HAMILTON_SUB_PATH` to the subpath required. For example, to run on `https://domain.com/hamilton`:

.. code-block:: yaml

- REACT_APP_HAMILTON_SUB_PATH=/hamilton

Make sure that the sub path environment variable begins with `/` if set.

Please reach out to us if you want to deploy on your own infrastructure and need help - `join slack <https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g>`_.
More extensive self-hosting documentation is in the works, e.g. Snowflake, Databricks, AWS, GCP, Azure, etc.; we'd love a helm
chart contribution!
Expand Down
3 changes: 2 additions & 1 deletion ui/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { UserContext } from "./auth/Login";
import { LocalAccount } from "./auth/LocalAccount";

export const localMode = process.env.REACT_APP_AUTH_MODE === "local";
export const subPath = process.env.REACT_APP_HAMILTON_SUB_PATH || ""

const useAuthInfoBasedOnProcEnv = () => {
if (localMode) {
Expand Down Expand Up @@ -99,7 +100,7 @@ export const App = () => {
includeHelp: true,
}}
>
<BrowserRouter>
<BrowserRouter basename={subPath}>
<Routes>
{localMode && (
<Route path="/" element={<Navigate to="/dashboard/account" />} />
Expand Down