forked from toolshed/abra
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
package app
 | 
						|
 | 
						|
import (
 | 
						|
	"coopcloud.tech/abra/cli/internal"
 | 
						|
	"coopcloud.tech/abra/pkg/autocomplete"
 | 
						|
	"github.com/urfave/cli/v2"
 | 
						|
)
 | 
						|
 | 
						|
var appNewDescription = `
 | 
						|
This command takes a recipe and uses it to create a new app. This new app
 | 
						|
configuration is stored in your ~/.abra directory under the appropriate server.
 | 
						|
 | 
						|
This command does not deploy your app for you. You will need to run "abra app
 | 
						|
deploy <app>" to do so.
 | 
						|
 | 
						|
You can see what recipes are available (i.e. values for the <recipe> argument)
 | 
						|
by running "abra recipe ls".
 | 
						|
 | 
						|
Passing the "--secrets/-S" flag will automatically generate secrets for your
 | 
						|
app and store them encrypted at rest on the chosen target server. These
 | 
						|
generated secrets are only visible at generation time, so please take care to
 | 
						|
store them somewhere safe.
 | 
						|
 | 
						|
You can use the "--pass/-P" to store these generated passwords locally in a
 | 
						|
pass store (see passwordstore.org for more). The pass command must be available
 | 
						|
on your $PATH.
 | 
						|
`
 | 
						|
 | 
						|
var appNewCommand = &cli.Command{
 | 
						|
	Name:        "new",
 | 
						|
	Usage:       "Create a new app",
 | 
						|
	Aliases:     []string{"n"},
 | 
						|
	Description: appNewDescription,
 | 
						|
	Flags: []cli.Flag{
 | 
						|
		internal.NewAppServerFlag,
 | 
						|
		internal.DomainFlag,
 | 
						|
		internal.NewAppNameFlag,
 | 
						|
		internal.PassFlag,
 | 
						|
		internal.SecretsFlag,
 | 
						|
	},
 | 
						|
	ArgsUsage:    "<recipe>",
 | 
						|
	Action:       internal.NewAction,
 | 
						|
	BashComplete: autocomplete.RecipeNameComplete,
 | 
						|
}
 |