Jack Lloyd-Walters has proposed merging ~lloydwaltersj/maas-site-manager:improve-readme-instructions into maas-site-manager:main.
Commit message: add additional install instructions to readme Requested reviews: MAAS Committers (maas-committers) For more details, see: https://code.launchpad.net/~lloydwaltersj/maas-site-manager/+git/site-manager/+merge/440488 Had to take a slight detour in getting the frontend to work, so those steps were documented here -- Your team MAAS Committers is requested to review the proposed merge of ~lloydwaltersj/maas-site-manager:improve-readme-instructions into maas-site-manager:main.
diff --git a/README.md b/README.md index 270e7ad..fc16294 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,33 @@ Ensure that you have a recent version of [Docker](https://docs.docker.com/get-do * Run `docker-compose up --build` to start the backend and the database. * Run `cd frontend` and `yarn dev` to start the frontend + +#### A note on installing the frontend +or: why yarn isn't straightforward sometimes + +As per default, `apt install yarn` installs `cmdtest`, a distinct package from the one we actually want to use. Instead, we reccomdend the following steps sourced from [yarn package](https://yarnpkg.com/): +```bash +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +``` +The yarn package is now added as a source, so install as expected +```bash +sudo apt update && sudo apt install --no-install-recommends yarn +``` +If not already installed, you'll also want NodeJS. We reccomend using [nvm](https://github.com/nvm-sh/nvm) to acomplish this: +```bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +``` +NodeJS 16 is the minimum recommended for MAAS-Site-Manager +```bash +nvm install 16 +nvm use 16 +``` +After which you should be able to build the frontend +```bash +cd frontend +yarn +yarn dev +``` \ No newline at end of file
-- Mailing list: https://launchpad.net/~sts-sponsors Post to : [email protected] Unsubscribe : https://launchpad.net/~sts-sponsors More help : https://help.launchpad.net/ListHelp

