Skip to content

Configure local UI run against local-env #495

@katariniss

Description

@katariniss

What we have now
We have to build docker images of UI and add them to local-env to see changes.

What we want to get
We want to be able to run service's UI locally to see the changes quicker without docker image build.
Run UI using a special script from package.json in one command.

Solution
Need a way to determine that this mode is on with the help of a new env variable or config.
If we understand that local-env mode is on, we will be able to turn on the proxy in vite config.

Depending on the mode, we will need to specify port of local-env (30900) to connect layout-ui.

Possible Flow

  1. Run time-ui locally on port 3507
  2. layout-ui is used from local-env (via a new env var) (or proxy)
  3. api is used from local-env (or proxy)
  4. refresh is covered with proxy and thus is on and is real from local-env
  5. Since there is no token in local storage of http://localhost:3507/time
  6. time-ui has a configured proxy from http://localhost:3507/auth to http://localhost:30090/auth
  7. Redirects to login page on http://localhost:3507/auth?redirectUrl=http://localhost:3507/time
  8. Enter login and password from a real Local Env account
  9. It creates a token in local storage of http://localhost:3507 and redirects to http://localhost:3507/time
  10. All requests to api go to http://localhost:30090/api/time(sort-of) with this token

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions