Skip to content
Open
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
25 changes: 25 additions & 0 deletions src/content/docs/add-user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
```
# ssh into the server
ssh [server ip]

# add new admin
sudo adduser [username]
sudo usermod -aG sudo [username]

# confirm it works
id [username]

# add to AllowUsers setting for ssh access
sudo vim /etc/ssh/sshd_config
sudo systemctl reload ssh

# add their public ssh key
sudo su - [username]
mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
vim ./.ssh/authorized_keys
exit

# optionally log out of the server
exit
```

26 changes: 26 additions & 0 deletions src/content/docs/deploy-website.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
```
# ssh into the server
ssh [ip address]

# change to the deploy user
sudo su - deploy

# update the relevant branch
cd ./next-website-v2/
git branch
git checkout main # or the branch you want
git pull
yarn install

# build and deploy the site
yarn build
pm2 list
pm2 restart 0 # or id of instance you want to restart

# visit the site to make sure it works

# log out of the deploy user, and optionally the server
exit
exit
``