update doc
This commit is contained in:
parent
5463d373fd
commit
0ccb226e44
46
README.md
46
README.md
|
|
@ -29,6 +29,12 @@ DNS Eintraege erstellen:
|
|||
```bash
|
||||
$ hcloud server ip moby
|
||||
$ hcloud server ip moby -6
|
||||
|
||||
# apt update
|
||||
# apt upgrade
|
||||
|
||||
Servername setzen:
|
||||
# hostnamectl set-hostname moby.nbit.ch
|
||||
```
|
||||
|
||||
```bash
|
||||
|
|
@ -125,3 +131,43 @@ Backup auf Storag Box:
|
|||
HERE
|
||||
```
|
||||
|
||||
|
||||
### Systemd Service Unit for docker-compose
|
||||
|
||||
see https://community.hetzner.com/tutorials/docker-compose-as-systemd-service
|
||||
|
||||
```bash
|
||||
root@moby:/etc/systemd/system# cat docker-compose@.service
|
||||
[Unit]
|
||||
Description=docker-compose %i service
|
||||
Requires=docker.service network-online.target
|
||||
After=docker.service network-online.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/home/joerg/moby-configs/%i
|
||||
Type=simple
|
||||
TimeoutStartSec=15min
|
||||
Restart=always
|
||||
User=joerg
|
||||
Group=joerg
|
||||
|
||||
ExecStartPre=/usr/bin/docker-compose pull --quiet --ignore-pull-failures
|
||||
ExecStartPre=/usr/bin/docker-compose build --pull
|
||||
|
||||
ExecStart=/usr/bin/docker-compose up --remove-orphans
|
||||
|
||||
ExecStop=/usr/bin/docker-compose down --remove-orphans
|
||||
|
||||
ExecReload=/usr/bin/docker-compose pull --quiet --ignore-pull-failures
|
||||
ExecReload=/usr/bin/docker-compose build --pull
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
# systemctl daemon-reload
|
||||
# systemctl enable --now docker-compose@proxy
|
||||
# systemctl enable --now docker-compose@nbit_websites
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue