Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make yarn up:expose actually expose Cloud Manager #9297

Merged
merged 5 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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