deployment arch

This commit is contained in:
2026-01-13 12:19:13 +00:00
parent 10e7191c8f
commit ab077d45eb
2 changed files with 22 additions and 33 deletions

13
main.go
View File

@@ -283,18 +283,15 @@ func init() {
}
func writePBConfig(path, serviceName string) error {
const tmpl = `[server]
const tmpl = `[pocketbase]
version = "%s"
service_name = "%s"
[server]
ip = "127.0.0.1"
port = 8090
domain = "example.com"
[pocketbase]
version = "%s"
service_name = "%s"
[deployment]
service_dir = "/root/pb/{service}"
environment_file = "/root/pb/{service}/.env"
`
return os.WriteFile(path, []byte(fmt.Sprintf(tmpl, defaultPocketbaseVersion, serviceName)), 0o644)
}