summaryrefslogtreecommitdiffstats
path: root/cmd/ship/root_v2.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ship/root_v2.go')
-rw-r--r--cmd/ship/root_v2.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/ship/root_v2.go b/cmd/ship/root_v2.go
index 03c99e7..aa81d1e 100644
--- a/cmd/ship/root_v2.go
+++ b/cmd/ship/root_v2.go
@@ -7,6 +7,8 @@ import (
7 "github.com/spf13/cobra" 7 "github.com/spf13/cobra"
8) 8)
9 9
10var hostFlag string
11
10// This file defines the v2 CLI structure. 12// This file defines the v2 CLI structure.
11// The primary command is: ship [PATH] [FLAGS] 13// The primary command is: ship [PATH] [FLAGS]
12// All output is JSON by default. 14// All output is JSON by default.
@@ -41,6 +43,7 @@ func initV2() {
41 rootV2Cmd.Flags().String("ttl", "", "Auto-delete after duration (e.g., 1h, 7d)") 43 rootV2Cmd.Flags().String("ttl", "", "Auto-delete after duration (e.g., 1h, 7d)")
42 rootV2Cmd.Flags().StringArray("env", nil, "Environment variable (KEY=VALUE)") 44 rootV2Cmd.Flags().StringArray("env", nil, "Environment variable (KEY=VALUE)")
43 rootV2Cmd.Flags().String("env-file", "", "Path to .env file") 45 rootV2Cmd.Flags().String("env-file", "", "Path to .env file")
46 rootV2Cmd.Flags().Int("container-port", 80, "Port the container listens on (Docker only)")
44 47
45 // Check for SHIP_PRETTY env var 48 // Check for SHIP_PRETTY env var
46 if os.Getenv("SHIP_PRETTY") == "1" { 49 if os.Getenv("SHIP_PRETTY") == "1" {
@@ -76,6 +79,7 @@ func runDeployV2(cmd *cobra.Command, args []string) error {
76 opts.TTL, _ = cmd.Flags().GetString("ttl") 79 opts.TTL, _ = cmd.Flags().GetString("ttl")
77 opts.Env, _ = cmd.Flags().GetStringArray("env") 80 opts.Env, _ = cmd.Flags().GetStringArray("env")
78 opts.EnvFile, _ = cmd.Flags().GetString("env-file") 81 opts.EnvFile, _ = cmd.Flags().GetString("env-file")
82 opts.ContainerPort, _ = cmd.Flags().GetInt("container-port")
79 83
80 // deployV2 handles all output and exits 84 // deployV2 handles all output and exits
81 deployV2(path, opts) 85 deployV2(path, opts)