github.com/pelicanplatform/pelican@v1.0.5/web_ui/frontend/README.md (about)

     1  # Origin UI
     2  
     3  This ui is generated with Next.js.
     4  
     5  ## Development
     6  
     7  ### Local
     8  
     9  In production builds the website is compiled and included with the code. This step 
    10  takes a couple minutes and is not well suited for development. Since the website 
    11  sits on top of the api the best way to develop just the website is to run the api
    12  and the website separately and then use nginx to make them come from the same host
    13  as they would in production. 
    14  
    15  #### To run the api:
    16  
    17  ```shell
    18  # From repo root
    19  make web-build
    20  goreleaser --clean --snapshot
    21  docker run --rm -it -p 8444:8443 -w /app -v $PWD/dist/pelican_linux_arm64/:/app pelican-dev /bin/bash
    22  ```
    23  
    24  ```shell
    25  # Inside the container
    26  cp pelican osdf
    27  ./osdf origin serve -f https://osg-htc.org -v /tmp/stash/:/test
    28  ```
    29  
    30  #### To run the website and the reverse proxy:
    31  
    32  First make sure that the ports are correct in `dev/nginx.conf` so that they point to
    33  the website and the api as expected. Then run the following command.
    34  
    35  ```shell
    36  sh dev/run.sh
    37  npm run dev
    38  ```
    39  
    40  ### Docker
    41  
    42  ```shell
    43  docker build -t origin-ui .
    44  ```
    45  
    46  ```shell
    47  docker run -it -p 3000:3000 -v $(pwd):/webapp origin-ui npm run dev
    48  ```
    49  
    50  You can also run if you have node installed locally via `npm install && npm run dev`.