2021-08-02 01:10:41 +00:00
|
|
|
package app
|
|
|
|
|
|
|
|
import (
|
|
|
|
"coopcloud.tech/abra/cli/internal"
|
2021-12-11 23:17:39 +00:00
|
|
|
"coopcloud.tech/abra/pkg/autocomplete"
|
2022-01-18 13:13:20 +00:00
|
|
|
"github.com/urfave/cli"
|
2021-08-02 01:10:41 +00:00
|
|
|
)
|
|
|
|
|
2021-08-02 03:18:20 +00:00
|
|
|
var appNewDescription = `
|
2021-09-04 22:14:27 +00:00
|
|
|
This command takes a recipe and uses it to create a new app. This new app
|
2021-08-02 01:10:41 +00:00
|
|
|
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
|
2022-01-25 12:48:04 +00:00
|
|
|
deploy <domain>" to do so.
|
2021-08-02 01:10:41 +00:00
|
|
|
|
2021-09-04 22:14:27 +00:00
|
|
|
You can see what recipes are available (i.e. values for the <recipe> argument)
|
|
|
|
by running "abra recipe ls".
|
2021-08-02 01:10:41 +00:00
|
|
|
|
|
|
|
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.
|
2021-08-02 03:18:20 +00:00
|
|
|
`
|
|
|
|
|
2022-01-18 13:13:20 +00:00
|
|
|
var appNewCommand = cli.Command{
|
2021-08-02 03:18:20 +00:00
|
|
|
Name: "new",
|
2021-09-04 23:34:56 +00:00
|
|
|
Aliases: []string{"n"},
|
2022-01-18 13:13:20 +00:00
|
|
|
Usage: "Create a new app",
|
2021-08-02 03:18:20 +00:00
|
|
|
Description: appNewDescription,
|
2021-08-02 01:10:41 +00:00
|
|
|
Flags: []cli.Flag{
|
2022-01-18 13:13:20 +00:00
|
|
|
internal.DebugFlag,
|
|
|
|
internal.NoInputFlag,
|
2021-11-03 08:10:13 +00:00
|
|
|
internal.NewAppServerFlag,
|
|
|
|
internal.DomainFlag,
|
2021-08-02 01:10:41 +00:00
|
|
|
internal.PassFlag,
|
|
|
|
internal.SecretsFlag,
|
|
|
|
},
|
2022-01-18 13:13:20 +00:00
|
|
|
Before: internal.SubCommandBefore,
|
2022-01-25 12:48:04 +00:00
|
|
|
ArgsUsage: "[<recipe>]",
|
2021-12-11 23:17:39 +00:00
|
|
|
Action: internal.NewAction,
|
|
|
|
BashComplete: autocomplete.RecipeNameComplete,
|
2021-08-02 03:18:20 +00:00
|
|
|
}
|