after getting caddy working

main
Thomas Hintz 1 month ago
parent 6789838f8f
commit 0efd57e6df

@ -2,7 +2,7 @@ variant: flatcar
version: 1.0.0 version: 1.0.0
systemd: systemd:
units: units:
- name: nginx.service - name: caddy.service
enabled: true enabled: true
contents: | contents: |
[Unit] [Unit]
@ -11,15 +11,15 @@ systemd:
Requires=docker.service Requires=docker.service
[Service] [Service]
TimeoutStartSec=0 TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker rm --force nginx1 ExecStartPre=-/usr/bin/docker rm --force caddy2
ExecStart=/usr/bin/docker run --name nginx1 --pull always --log-driver=journald --net host docker.io/nginx:1 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 nginx1 ExecStop=/usr/bin/docker stop caddy2
Restart=always Restart=always
RestartSec=5s RestartSec=5s
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
storage: storage:
files: files:
- path: /var/www/index.html - path: /var/caddy/Caddyfile
contents: contents:
inline: Hello worldxx inline: "localhost\n\nrespond \"Hello, world!\""

@ -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"}]}}

Loading…
Cancel
Save