mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
chore(docs): add key generation step
This commit is contained in:
27
README.md
27
README.md
@@ -27,9 +27,7 @@ npm run dev
|
|||||||
|
|
||||||
If you want to use your own database leave, the `DATABASE_URL` property filled in `docker/docker-compose.yml` with your databse credentials, otherwise you'll have to delete it.
|
If you want to use your own database leave, the `DATABASE_URL` property filled in `docker/docker-compose.yml` with your databse credentials, otherwise you'll have to delete it.
|
||||||
|
|
||||||
(wait for `start-prod` script to finish)
|
```shell
|
||||||
|
|
||||||
```
|
|
||||||
cd docker
|
cd docker
|
||||||
make build
|
make build
|
||||||
make start-prod
|
make start-prod
|
||||||
@@ -39,10 +37,29 @@ make start-prod
|
|||||||
|
|
||||||
Env var to define :
|
Env var to define :
|
||||||
|
|
||||||
```
|
```shell
|
||||||
DOCKER_USERNAME="Your docker username"
|
DOCKER_USERNAME="Your docker username"
|
||||||
DOCKER_PASSWORD="Your docker password"
|
DOCKER_PASSWORD="Your docker password"
|
||||||
SSH_HOST="Your SSH host"
|
SSH_HOST="Your SSH host"
|
||||||
SSH_USERNAME="Your SSH username"
|
SSH_USERNAME="Your SSH username"
|
||||||
SSH_KEY="Your SSH key"
|
SSH_KEY="Your SSH key" # see below
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> As a good practice, SSH Key should be generated on local machine instead of target/server/remote machine
|
||||||
|
|
||||||
|
Generate :
|
||||||
|
|
||||||
|
```shell
|
||||||
|
ssh-keygen -t rsa -b 4096
|
||||||
|
# you can save the file in your current folder since you're not supposed to use it personnaly (its purpose is only to be used by CI/CD)
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy :
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cat ~/.ssh/id_rsa.pub | ssh b@B 'cat >> ~/.ssh/authorized_keys'
|
||||||
|
# or
|
||||||
|
ssh-copy-id -i ~/.ssh/id_rsa.pub user@host
|
||||||
|
```
|
||||||
|
|
||||||
|
> Source: https://github.com/appleboy/ssh-action#setting-up-a-ssh-key
|
||||||
|
|||||||
Reference in New Issue
Block a user