Skip to content

Commit

Permalink
fix: Make yarn up:expose actually expose Cloud Manager (#9297)
Browse files Browse the repository at this point in the history
* make expose command work

* Added changeset: Made yarn up:expose actually expose Cloud Manager on all interfaces

* add some basic docs

* Update docs/GETTING_STARTED.md

Fix `envrionments` ➡️ `environments` typo

Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>

---------

Co-authored-by: Banks Nussman <banks@nussman.us>
Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 23, 2023
1 parent 210b476 commit 1ae16bd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
27 changes: 13 additions & 14 deletions docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

$ curl https://get.volta.sh | bash

## Add nvm to your .*rc file, or open a new terminal window.
## Add volta to your .*rc file, or open a new terminal window.

$ volta install node@18.14.1

Expand All @@ -42,26 +42,25 @@
10. Navigate to the root directory of the repository, then start Cloud Manager and the JS client with `yarn up`.
11. After installation, Cloud Manager should be running at http://localhost:3000.

## Serving a production build of Cloud Manager:
## Serving a production build of Cloud Manager

Since Cloud Manager was generated using Create React App, `yarn build` can be used to generate an optimized production bundle:
You can then serve these files however you prefer or use our included local http server.

```bash
yarn install:all

yarn install:all

yarn workspace linode-manager build
yarn workspace linode-manager build

yarn workspace linode-manager run start:ci
```

You can then serve these files however you prefer, for example, with [http-server](https://www.npmjs.com/package/http-server):

```bash

npm install -g http-server
## Exposing Cloud Manager's dev server to the network

cd packages/manager/build
By default, Cloud Manager's dev server only listens on `localhost`. If you need to
expose the Vite dev server, you can use the following command.

http-server .
> **Note**: This is useful for running Cloud Manager's dev server in Docker-like environments
```
```bash
yarn up:expose
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"up:expose": "yarn install:all && yarn build:validation && yarn build:sdk && yarn start:all:expose",
"dev": "yarn install:all && yarn start:all",
"start:all": "concurrently -n api-v4,validation,manager -c blue,yellow,green \"yarn workspace @linode/api-v4 start\" \"yarn workspace @linode/validation start\" \"yarn workspace linode-manager start\"",
"start:all:expose": "concurrently -n api-v4,validation,manager -c blue,yellow,green \"yarn workspace @linode/api-v4 start\" \"yarn workspace @linode/validation start\" \"yarn workspace linode-manager start --host\"",
"start:all:expose": "concurrently -n api-v4,validation,manager -c blue,yellow,green \"yarn workspace @linode/api-v4 start\" \"yarn workspace @linode/validation start\" \"yarn workspace linode-manager start:expose\"",
"start:manager": "yarn workspace linode-manager start",
"start:manager:ci": "yarn workspace linode-manager start:ci",
"clean": "rm -rf node_modules && rm -rf packages/@linode/api-v4/node_modules && rm -rf packages/manager/node_modules && rm -rf packages/@linode/validation/node_modules",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

Made yarn up:expose actually expose Cloud Manager on all interfaces ([#9297](https://github.com/linode/manager/pull/9297))
1 change: 1 addition & 0 deletions packages/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"postinstall": "patch-package",
"compare": "./scripts/jira-changelog.sh",
"start": "concurrently --raw \"vite\" \"tsc --watch --preserveWatchOutput\"",
"start:expose": "concurrently --raw \"vite --host\" \"tsc --watch --preserveWatchOutput\"",
"start:ci": "yarn serve ./build -p 3000 -s --cors",
"lint": "yarn run eslint . --ext .js,.ts,.tsx --quiet",
"build": "node scripts/prebuild.mjs && vite build",
Expand Down

0 comments on commit 1ae16bd

Please sign in to comment.