Skip to content

Commit 180e872

Browse files
committed
Updated README to include steps to build portal-wp code for manual deployments.
1 parent 1440053 commit 180e872

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,80 @@ To run the frontend service, follow these steps:
177177
178178
Open a browser and navigate to, https://localhost:5173
179179
180+
## Manual Deployments
181+
182+
To create a build to be deployed to AWS, follow the steps below.
183+
184+
### Prerequisite: Install Node or Node Version Manager
185+
186+
The `frontend` service relies on Node.js. The minimum version of Node.js that is needed is specified in [apps/frontend/.nvmrc](apps/frontend/.nvmrc). For developers that work on multiple projects relying on different versions of Node.js, we recommend installing [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm). `nvm` helps faciliate easily switching between different versions of node for a given shell environment.
187+
188+
189+
### I. Build frontend service dependencies
190+
191+
#### WDS
192+
193+
1. Using Git, clone the `wds` repository and switch to the `develop` branch — https://github.com/NASA-PDS/wds
194+
2. If you installed [`nvm`](#install-node-or-node-version-manager), open a ***new*** terminal window, navigate to the folder containing the `wds` repo, and set up Node.js for this terminal session:
195+
196+
```
197+
wds % nvm use
198+
Found '/Users/<your_username>/Projects/PDS/Engineering Node/Repos/wds/.nvmrc' with version <lts/iron>
199+
Now using node v20.16.0 (npm v10.8.1)
200+
```
201+
3. Run `npm clean-install` (See notes about differences between `npm install` and `npm clean-install`)
202+
4. Run `npm run build:css`
203+
5. Run `npm run build:icons`
204+
6. Run `npm link` to add the `@nasapds/wds` package to your local list of packages.
205+
7. Run `npm list -g`, if you see `@nasapds/wds` in the list, it was published locally successfully (note the path on your machine will point to the location of the `wds` repo on your machine):
206+
```
207+
wds % npm list -g
208+
/Users/<your_username>/.nvm/versions/node/v20.16.0/lib
209+
├── @nasapds/[email protected] -> ./../../../../../Projects/PDS/Engineering Node/Repos/wds-clean
210+
211+
212+
```
213+
214+
#### WDS-REACT
215+
216+
1. Using Git, clone the `wds-react` repository and switch to the `develop` branch — https://github.com/NASA-PDS/wds-react
217+
2. If you installed [`nvm`](#install-node-or-node-version-manager), open a ***new*** terminal window, navigate to the folder containing the `wds-react` repo, and set up Node.js for this terminal session:
218+
219+
```
220+
wds-react % nvm use
221+
Found '/Users/<your_username>/Projects/PDS/Engineering Node/Repos/wds-react/.nvmrc' with version <lts/iron>
222+
Now using node v20.16.0 (npm v10.8.1)
223+
```
224+
3. Run `npm clean-install` (See notes about differences between `npm install` and `npm clean-install`)
225+
4. Run `npm link @nasapds/wds` to link to the `wds` package we previously published locally.
226+
5. Run `npm run build-lib`
227+
6. Run `npm run build-icons`
228+
7. Run `npm link` to add the `@nasapds/wds-react` package to your local list of packages.
229+
8. Run `npm list -g`, if you see `@nasapds/wds-react` in the list, it was published locally successfully (note the path on your machine will point to the location of the `wds-react` repo on your machine):
230+
```
231+
wds-react % npm list -g
232+
/Users/<your_username>/.nvm/versions/node/v20.16.0/lib
233+
├── @nasapds/[email protected] -> ./../../../../../Projects/PDS/Engineering Node/Repos/wds-react
234+
├── @nasapds/[email protected] -> ./../../../../../Projects/PDS/Engineering Node/Repos/wds
235+
236+
237+
```
238+
239+
### II. Build portal codebase for manual deployment
240+
241+
1. Using Git, clone the `portal-wp` repository and switch to the `develop` branch — https://github.com/NASA-PDS/portal-wp
242+
2. If you installed [`nvm`](#install-node-or-node-version-manager), open a ***new*** terminal window, navigate to the folder containing the `portal-wp` repo, and from there navigate to `apps/frontend` and set up Node.js for this terminal session:
243+
244+
```
245+
frontend % nvm use
246+
Found '/Users/<your_username>/Projects/PDS/Engineering Node/Repos/portal-wp/apps/frontend/.nvmrc' with version <lts/iron>
247+
Now using node v20.16.0 (npm v10.8.1)
248+
```
249+
3. Run `npm clean-install` (See notes about differences between `npm install` and `npm clean-install`)
250+
4. Run `npm link @nasapds/wds-react` to link to the `wds-react` package we previously published locally.
251+
5. Run `npm run build` to create a build of the portal-wp code
252+
6. Upload the contents of `apps/frontend/dist` to the S3 bucket mentioned in the wiki.
253+
180254
## Usage
181255
182256
TBD

0 commit comments

Comments
 (0)