Improve README

This commit is contained in:
Daniel Meiburg 2024-03-22 21:58:42 +01:00
parent bec952f96c
commit 8e0baf3a84
Signed by: dm
GPG Key ID: E5827ECFFE0AA4F2
1 changed files with 9 additions and 4 deletions

View File

@ -16,22 +16,26 @@ The env files are encrypted for key@dmeiburg.de and server@dmeiburg.de.
## Server setup
```sh
# create bare repo on dmeiburg.de
# create bare repo on dm@dmeiburg.de
mkdir -p git/container.git
cd git/container.git
git init --bare
# create and checkout working dir
cd && git clone ~/git/container.git
cd ~/container && git checkout main # might not be needed or needs to be master
```
```sh
# install the post receive hook, by using this command on the local machine
# whenever the hook is edited, this command has to be used again
scp post-receive dmeiburg:~/git/container/hooks/
scp post-receive dm@dmeiburg:~/git/container.git/hooks/
```
## Local setup
```sh
# add bare repo as remote on local machine
git remote add dmeiburg ssh://root@dmeiburg.de:/root/git/container.git
git remote add dmeiburg ssh://dm@dmeiburg.de:/dm/git/container.git
```
## Encrypting .env files
@ -39,9 +43,10 @@ git remote add dmeiburg ssh://root@dmeiburg.de:/root/git/container.git
To encrypt an .env files, the following command is used:
```sh
$ gpg -er key@dmeiburg.de -r server@dmeiburg.de .env
$ gpg -er key@dmeiburg.de -r dm@dmeiburg.de .env
```
It's assumed dm@dmeiburg.de is a public gpg key for the server.
## Deployment