Skip to content

Improvemenets on Feathr UI/REST API deployment experience #345

@blrchen

Description

@blrchen

Currently there is no clear instructions on how to deploy Feathr UI and REST API, we should have clear instructions on how to do this.

Furthermore, currently the E2E deployment experience is a bit complex for getting started. Following describes steps required:

  1. Build a docker image for REST API, publish to container registry
  2. Deploy REST API as a container app
  3. Update UI configuration to use api endpoint created in step 2, build a docker image for UI, publish to container registry
  4. Depoy UI as a container app

Propose to simplify this into one nginx based docker image so both Feathr UI and REST API can be run as one single container app. Using nginx as load balancer is very popular among modern tech stack engineers.

Pseudo nginx configuration:

location / {
  # Serve static frontend react app
  try_files $uri $uri/ /index.html; 
}

location /api {  
  # serve backend FastAPI app
  proxy_pass http://localhost:8000; /
}

Another option is leverage FastAPI's static file serve to host ui static files without nginx. However, this is not recommended due to performance concerns of FastAPI. There is one more benefit for using nginx, in case REST API is rewritten by a different language, the nginx config can continue to work without changes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions