feat: 🎉 complete maker nginx(app)

This commit is contained in:
zhaoyupeng
2025-11-26 21:03:41 +08:00
parent 4ec58ce4e5
commit 11523e3e48
26 changed files with 1458 additions and 6 deletions

View File

@@ -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
}