From 13c2f9cffa624fdf498f3b61fab9d809b92e026e Mon Sep 17 00:00:00 2001 From: bndw Date: Sun, 28 Dec 2025 09:21:08 -0800 Subject: init --- templates/app.caddy.tmpl | 3 +++ templates/service.tmpl | 17 +++++++++++++++++ templates/static.caddy.tmpl | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 templates/app.caddy.tmpl create mode 100644 templates/service.tmpl create mode 100644 templates/static.caddy.tmpl (limited to 'templates') diff --git a/templates/app.caddy.tmpl b/templates/app.caddy.tmpl new file mode 100644 index 0000000..505d1d9 --- /dev/null +++ b/templates/app.caddy.tmpl @@ -0,0 +1,3 @@ +{{.Domain}} { + reverse_proxy 127.0.0.1:{{.Port}} +} diff --git a/templates/service.tmpl b/templates/service.tmpl new file mode 100644 index 0000000..87389f0 --- /dev/null +++ b/templates/service.tmpl @@ -0,0 +1,17 @@ +[Unit] +Description={{.Name}} +After=network.target + +[Service] +Type=simple +User={{.User}} +WorkingDirectory={{.WorkDir}} +EnvironmentFile={{.EnvFile}} +ExecStart={{.BinaryPath}} --port={{.Port}} +Restart=always +RestartSec=5s +NoNewPrivileges=true +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/templates/static.caddy.tmpl b/templates/static.caddy.tmpl new file mode 100644 index 0000000..d04f6b0 --- /dev/null +++ b/templates/static.caddy.tmpl @@ -0,0 +1,5 @@ +{{.Domain}} { + root * {{.RootDir}} + file_server + encode gzip +} -- cgit v1.2.3