feat: 🎉 complete maker nginx(app)
This commit is contained in:
@@ -17,6 +17,7 @@ func App() *cobra.Command {
|
||||
appGateway(),
|
||||
appMie(),
|
||||
appOEM(),
|
||||
appNginx(),
|
||||
)
|
||||
|
||||
return _cmd
|
||||
@@ -118,3 +119,30 @@ func appOEM() *cobra.Command {
|
||||
|
||||
return _cmd
|
||||
}
|
||||
|
||||
func appNginx() *cobra.Command {
|
||||
var (
|
||||
replica int
|
||||
disableSeafile bool
|
||||
)
|
||||
|
||||
_cmd := &cobra.Command{
|
||||
Use: "nginx",
|
||||
Short: "Make Nginx App",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
opts := []maker.NginxOpt{
|
||||
maker.WithNginxReplica(replica),
|
||||
}
|
||||
if disableSeafile {
|
||||
opts = append(opts, maker.WithoutNginxSeafile())
|
||||
}
|
||||
mk := maker.NewMaker()
|
||||
return mk.AppNginx(cmd.Context(), opts...)
|
||||
},
|
||||
}
|
||||
|
||||
_cmd.Flags().IntVar(&replica, "replica-count", 2, "Replica count")
|
||||
_cmd.Flags().BoolVar(&disableSeafile, "disable-seafile", false, "Disable seafile")
|
||||
|
||||
return _cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user