Update 'README.md'
Signed-off-by: dm <dm@noreply.git.dmeiburg.de>
This commit is contained in:
parent
96aa95c404
commit
ac635b6326
16
README.md
16
README.md
|
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
This project contains my personal docker compose configurations.
|
This project contains my personal docker compose configurations.
|
||||||
|
|
||||||
#### Operating principle:
|
## Operating principle:
|
||||||
Changes in this repo get pushed to a bare repo on dmeiburg.de.
|
Changes in this repo get pushed to a bare repo on dmeiburg.de.
|
||||||
Whenever a push is received a post-receive hook runs.
|
Whenever a push is received a post-receive hook runs.
|
||||||
|
|
||||||
The post-receive hook then:
|
The `post-receive hook` then:
|
||||||
- deploys the code into a working directory
|
- deploys the code into a working directory
|
||||||
- decrypts .env.gpg files
|
- decrypts .env.gpg files
|
||||||
- restarts stacks with changed compose files
|
- restarts stacks with changed compose files
|
||||||
|
|
||||||
The env files are encrypted for key@dmeiburg.de and server@dmeiburg.de.
|
The env files are encrypted for key@dmeiburg.de and server@dmeiburg.de.
|
||||||
|
|
||||||
#### Server setup
|
## Server setup
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# create bare repo on dmeiburg.de
|
# create bare repo on dmeiburg.de
|
||||||
|
|
@ -23,18 +23,18 @@ git init --bare
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# install the post receive hook
|
# 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
|
# whenever the hook is edited, this command has to be used again
|
||||||
scp post-receive dmeiburg:~/git/container/hooks/
|
scp post-receive dmeiburg:~/git/container/hooks/
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Local setup
|
## Local setup
|
||||||
```sh
|
```sh
|
||||||
# add bare repos as remote on local machine
|
# 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://root@dmeiburg.de:/root/git/container.git
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Encrypting .env files
|
## Encrypting .env files
|
||||||
|
|
||||||
To encrypt an .env files, the following command is used:
|
To encrypt an .env files, the following command is used:
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ $ gpg -er key@dmeiburg.de -r server@dmeiburg.de .env
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Deployment
|
## Deployment
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git push dmeiburg
|
git push dmeiburg
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue