deploy command attempt 1

This commit is contained in:
2026-01-13 11:58:08 +00:00
parent 57835893d5
commit 67c8c24c7d
4 changed files with 348 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ func defaultCommands() []command {
return []command{
{name: "init", description: "start a new PocketBase project", action: runInit},
{name: "dev", description: "run the PocketBase binary locally", action: runDev},
{name: "deploy", description: "deploy the PocketBase project", action: placeholderAction("deploy")},
{name: "deploy", description: "deploy the PocketBase project", action: runDeploy},
{name: "logs", description: "show PocketBase logs", action: placeholderAction("logs")},
{name: "secrets", description: "manage deployment secrets", action: placeholderAction("secrets")},
}
@@ -284,6 +284,10 @@ 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)
}