diff options
| author | bndw <ben@bdw.to> | 2025-12-28 09:21:08 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2025-12-28 09:21:08 -0800 |
| commit | 13c2f9cffa624fdf498f3b61fab9d809b92e026e (patch) | |
| tree | 4b25205ccd05e9e887376c10edb2f4069ea1d9d4 /templates | |
init
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/app.caddy.tmpl | 3 | ||||
| -rw-r--r-- | templates/service.tmpl | 17 | ||||
| -rw-r--r-- | templates/static.caddy.tmpl | 5 |
3 files changed, 25 insertions, 0 deletions
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 @@ | |||
| 1 | {{.Domain}} { | ||
| 2 | reverse_proxy 127.0.0.1:{{.Port}} | ||
| 3 | } | ||
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 @@ | |||
| 1 | [Unit] | ||
| 2 | Description={{.Name}} | ||
| 3 | After=network.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=simple | ||
| 7 | User={{.User}} | ||
| 8 | WorkingDirectory={{.WorkDir}} | ||
| 9 | EnvironmentFile={{.EnvFile}} | ||
| 10 | ExecStart={{.BinaryPath}} --port={{.Port}} | ||
| 11 | Restart=always | ||
| 12 | RestartSec=5s | ||
| 13 | NoNewPrivileges=true | ||
| 14 | PrivateTmp=true | ||
| 15 | |||
| 16 | [Install] | ||
| 17 | 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 @@ | |||
| 1 | {{.Domain}} { | ||
| 2 | root * {{.RootDir}} | ||
| 3 | file_server | ||
| 4 | encode gzip | ||
| 5 | } | ||
