43 lines
853 B
Plaintext
43 lines
853 B
Plaintext
package loki
|
|
|
|
import "du5t1n.me/cfg/base/schema/instructions"
|
|
|
|
import "du5t1n.me/cfg/app/caddy"
|
|
|
|
templates: [...instructions.#RenderInstruction] & [
|
|
{
|
|
template: "loki/config.yml"
|
|
dest: "/etc/loki/config.yml"
|
|
hooks: {
|
|
changed: [{run: "systemctl try-restart loki"}]
|
|
}
|
|
},
|
|
{
|
|
template: "loki/loki.container"
|
|
dest: "/etc/containers/systemd/loki.container"
|
|
hooks: {
|
|
changed: [
|
|
{
|
|
run: "systemctl daemon-reload"
|
|
immediate: true
|
|
},
|
|
{run: "systemctl restart loki"},
|
|
]
|
|
}
|
|
},
|
|
{
|
|
template: "loki/caddy-client-ca.crt"
|
|
dest: "/etc/caddy/client-ca.crt"
|
|
hooks: {
|
|
changed: [{run: "systemctl try-reload-or-restart caddy"}]
|
|
}
|
|
},
|
|
{
|
|
template: "loki/Caddyfile"
|
|
dest: "/etc/caddy/Caddyfile"
|
|
hooks: {
|
|
changed: [{run: "systemctl try-reload-or-restart caddy"}]
|
|
}
|
|
},
|
|
]+caddy.templates
|