ui-server

module
v2.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: MIT

README

ui-server

build E2E Tests Publish Docker image Update UI Submodule

ui-server serves an HTTP API analogue of Temporal gRPC API as well as serves Temporal UI https://github.com/temporalio/ui. It can be compiled into a binary or consumed as a Go library.

Docker

Using Temporal CLI

You can install Temporal CLI using Homebrew:

brew install temporal

You can start a Temporal server in development using the following command:

temporal server start-dev

You can access the UI by visiting http://localhost:8233.

Using Docker

After pulling down the lastest version of Temporal's docker-compose, you can access the UI by visiting http://localhost:8080.

You can run it with Temporal Server using the Temporal docker-compose.

See Docker README for more details on running Docker images

Configuration

pnpm install
pnpm run build:local
pnpm run preview:local
Using Docker

If you're running the development version of the UI and you want to point it at the docker-compose version of Temporal, you can run this command:

pnpn run build:docker
pnpn run preview:docker

Developing

Developing the UI has the same prequisites as trying it out. Once you've created a project and installed dependencies with pnpm install, start the development server:

pnpm start

and open localhost:3000.

By default, the application will start up with a version of the UI for the local version of Temporal. You can start the UI for Temporal Cloud by setting the VITE_TEMPORAL_UI_BUILD_TARGET target to cloud. Alternatively, you can use either of the following scripts:

pnpm run dev:local
pnpm run dev:cloud
Using Docker

If you want to point the development environment at the docker-compose version of Temporal, you can use the following command:

pnpm run dev:docker

Building

The Temporal UI must be built for either the local version or Temporal Cloud. You must set the VITE_TEMPORAL_UI_BUILD_TARGET environment variable in order to build the assets. This will be set for you if you use either of the following pnpm scripts.

pnpm run build:local
pnpm run build:cloud

The resulting assets will be placed in .vercel/output/static.

  • Alternatively you can pass a .yaml configuration file based on the Dockerize template . Ex development.yml config

Check out the configuration docs for more details

Development

Variable Description Default Stage
VITE_API Temporal HTTP API address. Set to empty `` to use relative paths http://localhost:8322 Build
VITE_MODE Build target development Build

Developing with Canary

To get a better representation of production data, you can run our UI with the canary-go repo. You will need Go installed on your machine.

canary-go
make bins
./temporal-canary start
temporal
make bins
TEMPORAL_ENVIRONMENT=development_sqlite make start
tctl
make build
./tctl config set version next
./tctl -n canary namespace register
./tctl -n default namespace register
./tctl cluster add-search-attributes -y \
 	--name CustomKeywordField --type Keyword \
 	--name CustomStringField --type Text \
 	--name CustomTextField --type Text \
 	--name CustomIntField --type Int \
 	--name CustomDatetimeField --type Datetime \
 	--name CustomDoubleField --type Double \
 	--name CustomBoolField --type Bool

To view the search attributes code: https://github.com/temporalio/docker-builds/blob/main/docker/auto-setup.sh#L297

ui-server
make build-server
./ui-server start

Debugging

In VSCode launch "Debug Server" script (or press F5)

Directories

Path Synopsis
api
workflowservice/v1
Package workflowservice is a reverse proxy.
Package workflowservice is a reverse proxy.
cmd
server command
plugins
api
rpc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL