Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
content:serverbasics:docker-caddy [2024/01/12 20:41] – [Create Caddy Yaml] Daniel | content:serverbasics:docker-caddy [2024/01/18 14:45] (aktuell) – [Create Caddy Yaml] Daniel | ||
---|---|---|---|
Zeile 11: | Zeile 11: | ||
===== DNS- Records ===== | ===== DNS- Records ===== | ||
- | You will also need a domainname like '' | + | You will also need a domainname like '' |
+ | |||
==== Register some Domain ==== | ==== Register some Domain ==== | ||
Zeile 52: | Zeile 54: | ||
- NET_ADMIN | - NET_ADMIN | ||
healthcheck: | healthcheck: | ||
- | test: "wget --no-verbose --tries=1 --spider https://obel1x.dynv6.net || exit 1" | + | test: "wget --no-verbose --tries=1 --spider https://www.servername.domainname.tld |
interval: " | interval: " | ||
timeout: " | timeout: " | ||
start_period: | start_period: | ||
retries: 3 | retries: 3 | ||
- | # initially i wanted | + | # Be sure, that docker daemon has access |
- | # it turned out not to work in rootless- mode for security reasons | + | # This can be archived by: |
- | # so don't use host- mode. to access local services take the hostname directly, maybe define it static and add it to / | + | # setcap cap_net_bind_service=+ep / |
- | # e.g. pcserver: | + | # |
- | # NOT localhost: | + | # To access local services, take the hostname directly, maybe define it static and add it to / |
+ | # Mind, that the ports must be pubilshed by the other containers to the host via ports or expose, or add them to the network | ||
+ | # e.g. pcserver: | ||
+ | #Do NOT use networkmode: | ||
# network_mode: | # network_mode: | ||
- | # set / | ||
- | # net.ipv4.ip_unprivileged_port_start = 80 | ||
- | # net.ipv4.ip_unprivileged_port_start = 443 | ||
- | # can also be set without booting: sysctl key = value | ||
ports: | ports: | ||
- " | - " | ||
Zeile 114: | Zeile 115: | ||
</ | </ | ||
- | replace mylocalhostname with your actual hostname (can be found out by calling hostname in your terminal). | + | replace |
Don't use localhost - see above. If you do not have a clue which hostname you have, better specify some fixed one which you can freely chose and edit ''/ | Don't use localhost - see above. If you do not have a clue which hostname you have, better specify some fixed one which you can freely chose and edit ''/ | ||
+ | |||
+ | |||
===== Fetch and run the Caddy Container ===== | ===== Fetch and run the Caddy Container ===== | ||