0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

Update how-to-deploy-on-AWS.md (#2722)

suggestions and fixes to the instructions, as I followed along making a new aws instance
This commit is contained in:
Paulo Renan Melo 2021-12-01 16:20:13 +00:00 committed by GitHub
parent 21ddd12166
commit 82f6886ded
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,18 +9,21 @@ This document describes simple steps to setup Verdaccio private registry on Amaz
**Step 1:** Open SSH & Login in using your EC2 key.
**Step 2:** Install Node Version Manager (nvm) first
**Step 2:** Install Node Version Manager (nvm) first, close and re-open the SSH using your EC2 key.
```
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
```
``` sudo apt update ```
``` wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash ```
``` exit ```
**Step 3:** Install Node using Node Version Manager (nvm)
``` nvm install node ```
**Step 4:** Install Verdaccio & pm2, will require to run Verdaccio service in background
```yaml npm i -g verdaccio pm2 ```
``` npm i -g verdaccio pm2 ```
**Step 5:** Set the verdaccio registry as a source. By default original NPM registry set.
@ -28,7 +31,7 @@ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh |
``` npm set ca null ```
**Step 6:** Run Verdaccio and stop it. It will create a config file we will use.
**Step 6:** Run Verdaccio and stop it (ctrl+c). It will create a config file we will use.
``` verdaccio ```
@ -36,17 +39,22 @@ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh |
Open and edit `config.yaml` file:
``` nano .config/verdaccio/config.yaml ```
``` nano .config/verdaccio/config.yaml ``` or ``` nano ~/verdaccio/config.yaml ```
Add below lines at the end. [(read more)](https://github.com/verdaccio/verdaccio/blob/ff409ab7c05542a152100e3bc39cfadb36a8a080/conf/full.yaml#L113)
```yaml listen:
```
listen:
- 0.0.0.0:4873
```
Change below line so that only authenticated person can access our registry
``` Replace "access: $all" with "access: $authenticated" ```
(Optional) Change below line according to how many users you wish to grant access to the scoped registry
``` Replace "#max_users: 1000" with "max_users: 1" ```
There are some more parameters available to configure it. Like storage, proxy, default port change. [(read more)](https://github.com/verdaccio/verdaccio/blob/ff409ab7c05542a152100e3bc39cfadb36a8a080/conf/full.yaml#L113)
@ -67,6 +75,22 @@ The URL will look like something:
To confirm Verdaccio's running status, run the command below:
``` pm2 list ```
To make Verdaccio launch on startup, run the commands below:
``` pm2 stop verdaccio ```
``` pm2 delete verdaccio ```
``` pm2 startup ``` This will show a command in your terminal. Copy / paste it and execute it to have pm2 make a startup service for you.
``` which verdaccio ``` Copy the path shown by this command.
``` pm2 start /home/ubuntu/.nvm/versions/node/v17.1.0/bin/verdaccio ``` (put the path you copied from command above).
``` pm2 status ``` This should show "online" on the status of verdaccio service.
``` pm2 save ``` Now when you reboot the EC2 instance, it should launch verdaccio.
**Step 10:** Registering a user in verdaccio registry