update doc

This commit is contained in:
Joerg Lehmann 2021-08-03 20:31:50 +02:00
parent 5463d373fd
commit 0ccb226e44
1 changed files with 46 additions and 0 deletions

View File

@ -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
```