hashicorp / hashicorp/nomad

Allow serving UI assets from disk

Open
#12,450 0 comments 1 reaction 0 assignees View on GitHub
theme/ui type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Proposal

Add an agent configuration parameter to allow loading web UI assets (html/css/javascript/images) from the agent's filesystem instead of from the copy builtin to the `nomad` binary.

Perhaps a parameter like [`ui.asset_path`](https://www.nomadproject.io/docs/configuration/ui):

```hcl
ui {
asset_path = /var/lib/nomad/ui
}
```

A CLI parameter would be handy for development:

```shell
$ nomad agent -dev -ui-asset-path=/var/lib/nomad/ui
```

If there's a standard name/behavior for this kind of configuration parameter in Consul, Vault, or 3rd party projects, I'd love to match them.

### Use-cases

#### Development

Testing UI changes could be as easy as manipulating files on disk. Right now you can serve the UI on a different port than Nomad's HTTP server, but then you run into cross-origin issues.

#### Custimization

Users could alter the UI without having to use a secondary HTTP server.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the UI configuration and the `nomad agent -dev` command path, including how the built-in assets are currently served. Define the configured filesystem path and CLI override behavior, then verify that assets load from disk without breaking the existing built-in path or same-origin development workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
backend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.