From 0efd57e6dfb94ce0fe14625e8fc4a627b4334ffd Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Mon, 21 Jul 2025 12:18:35 -0700 Subject: [PATCH] after getting caddy working --- flatcar-quickstart2/cl.yaml | 12 ++++++------ flatcar-quickstart2/ignition.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flatcar-quickstart2/cl.yaml b/flatcar-quickstart2/cl.yaml index c097dd4..2a33080 100644 --- a/flatcar-quickstart2/cl.yaml +++ b/flatcar-quickstart2/cl.yaml @@ -2,7 +2,7 @@ variant: flatcar version: 1.0.0 systemd: units: - - name: nginx.service + - name: caddy.service enabled: true contents: | [Unit] @@ -11,15 +11,15 @@ systemd: Requires=docker.service [Service] TimeoutStartSec=0 - ExecStartPre=-/usr/bin/docker rm --force nginx1 - ExecStart=/usr/bin/docker run --name nginx1 --pull always --log-driver=journald --net host docker.io/nginx:1 - ExecStop=/usr/bin/docker stop nginx1 + ExecStartPre=-/usr/bin/docker rm --force caddy2 + ExecStart=/usr/bin/docker run --name caddy2 --pull always --log-driver=journald --net host -v /var/caddy:/etc/caddy docker.io/caddy:2 + ExecStop=/usr/bin/docker stop caddy2 Restart=always RestartSec=5s [Install] WantedBy=multi-user.target storage: files: - - path: /var/www/index.html + - path: /var/caddy/Caddyfile contents: - inline: Hello worldxx + inline: "localhost\n\nrespond \"Hello, world!\"" diff --git a/flatcar-quickstart2/ignition.json b/flatcar-quickstart2/ignition.json index a4cc8b1..c1c3f76 100644 --- a/flatcar-quickstart2/ignition.json +++ b/flatcar-quickstart2/ignition.json @@ -1 +1 @@ -{"ignition":{"version":"3.3.0"},"storage":{"files":[{"path":"/var/www/index.html","contents":{"compression":"","source":"data:,Hello%20worldxx"}}]},"systemd":{"units":[{"contents":"[Unit]\nDescription=NGINX example\nAfter=docker.service\nRequires=docker.service\n[Service]\nTimeoutStartSec=0\nExecStartPre=-/usr/bin/docker rm --force nginx1\nExecStart=/usr/bin/docker run --name nginx1 --pull always --log-driver=journald --net host docker.io/nginx:1\nExecStop=/usr/bin/docker stop nginx1\nRestart=always\nRestartSec=5s\n[Install]\nWantedBy=multi-user.target\n","enabled":true,"name":"nginx.service"}]}} +{"ignition":{"version":"3.3.0"},"storage":{"files":[{"path":"/var/caddy/Caddyfile","contents":{"compression":"","source":"data:,localhost%0A%0Arespond%20%22Hello%2C%20world!%22"}}]},"systemd":{"units":[{"contents":"[Unit]\nDescription=NGINX example\nAfter=docker.service\nRequires=docker.service\n[Service]\nTimeoutStartSec=0\nExecStartPre=-/usr/bin/docker rm --force caddy2\nExecStart=/usr/bin/docker run --name caddy2 --pull always --log-driver=journald --net host -v /var/caddy:/etc/caddy docker.io/caddy:2\nExecStop=/usr/bin/docker stop caddy2\nRestart=always\nRestartSec=5s\n[Install]\nWantedBy=multi-user.target\n","enabled":true,"name":"caddy.service"}]}}