You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
733 B
YAML
26 lines
733 B
YAML
variant: flatcar
|
|
version: 1.0.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
|
|
storage:
|
|
files:
|
|
- path: /var/caddy/Caddyfile
|
|
contents:
|
|
inline: "localhost\n\nrespond \"Hello, world!\""
|