feat(archie): add headless bootstrap command and remote extension wiring
This commit is contained in:
7 files changed
+424
-20
No files matched your search
+6
-1
@@ -23,10 +23,11 @@ func main() {
|
||||
|
||||
func run() error {
|
||||
configPath := flag.String("config", archie.DefaultConfigPath(), "path to the bootstrap config file")
|
||||
specPath := flag.String("spec", "", "path to the bootstrap spec file (used by 'archie bootstrap')")
|
||||
newIdentity := flag.Bool("new-age-identity", false, "print a new age identity for age_identity and exit")
|
||||
showVersion := buildinfo.RegisterVersionFlag("archie")
|
||||
flag.Usage = func() {
|
||||
_, _ = fmt.Fprintln(flag.CommandLine.Output(), "usage: archie [flags]\n archie migrate apply database migrations and runtime grants\n archie openapi print the API's OpenAPI document")
|
||||
_, _ = fmt.Fprintln(flag.CommandLine.Output(), "usage: archie [flags]\n archie migrate apply database migrations and runtime grants\n archie bootstrap idempotently provision initial owner and SSO settings\n archie openapi print the API's OpenAPI document")
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
flag.Parse()
|
||||
@@ -40,6 +41,10 @@ func run() error {
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer stop()
|
||||
return archie.Migrate(ctx, *configPath)
|
||||
case "bootstrap":
|
||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer stop()
|
||||
return archie.Bootstrap(ctx, *configPath, *specPath)
|
||||
case "openapi":
|
||||
doc, err := archie.Document()
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user