moving configs to local files
parent
1f3094c6c2
commit
21cc7a8c11
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=NGINX example
|
||||
After=docker.service
|
||||
Requires=docker.service
|
||||
[Service]
|
||||
TimeoutStartSec=0
|
||||
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
|
@ -0,0 +1,3 @@
|
||||
localhost
|
||||
|
||||
respond "Hello, again!"
|
@ -1,25 +1,12 @@
|
||||
variant: flatcar
|
||||
version: 1.0.0
|
||||
version: 1.1.0
|
||||
systemd:
|
||||
units:
|
||||
- name: caddy.service
|
||||
enabled: true
|
||||
contents: |
|
||||
[Unit]
|
||||
Description=NGINX example
|
||||
After=docker.service
|
||||
Requires=docker.service
|
||||
[Service]
|
||||
TimeoutStartSec=0
|
||||
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
|
||||
contents_local: caddy.service
|
||||
storage:
|
||||
files:
|
||||
- path: /var/caddy/Caddyfile
|
||||
contents:
|
||||
inline: "localhost\n\nrespond \"Hello, world!\""
|
||||
local: caddyfile-contents
|
||||
|
@ -1 +1 @@
|
||||
{"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"}]}}
|
||||
{"ignition":{"version":"3.4.0"},"storage":{"files":[{"path":"/var/caddy/Caddyfile","contents":{"compression":"","source":"data:,localhost%0A%0Arespond%20%22Hello%2C%20again!%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","enabled":true,"name":"caddy.service"}]}}
|
||||
|
Loading…
Reference in New Issue