@@ -16,14 +16,13 @@ const (
1616 DefaultBranch = "main"
1717 DefaultDockerfile = "Dockerfile"
1818 DefaultRegistry = "ghcr.io/unkeyed/deploy"
19- DefaultControlPlaneURL = "http ://localhost:7091 "
19+ DefaultControlPlaneURL = "https ://ctrl.unkey.cloud "
2020 DefaultAuthToken = "ctrl-secret-token"
21- DefaultEnvironment = "Production "
21+ DefaultEnvironment = "preview "
2222
2323 // Environment variables
24- EnvWorkspaceID = "UNKEY_WORKSPACE_ID"
25- EnvKeyspaceID = "UNKEY_KEYSPACE_ID"
26- EnvRegistry = "UNKEY_REGISTRY"
24+ EnvKeyspaceID = "UNKEY_KEYSPACE_ID"
25+ EnvRegistry = "UNKEY_REGISTRY"
2726
2827 // URL prefixes
2928 HTTPSPrefix = "https://"
@@ -81,7 +80,6 @@ var stepSequence = map[string]string{
8180
8281// DeployOptions contains all configuration for deployment
8382type DeployOptions struct {
84- WorkspaceID string
8583 ProjectID string
8684 KeyspaceID string
8785 Context string
@@ -106,22 +104,21 @@ var DeployFlags = []cli.Flag{
106104 cli .Bool ("init" , "Initialize configuration file in the specified directory" ),
107105 cli .Bool ("force" , "Force overwrite existing configuration file when using --init" ),
108106 // Required flags (can be provided via config file)
109- cli .String ("workspace-id" , "Workspace ID" , cli .EnvVar (EnvWorkspaceID )),
110107 cli .String ("project-id" , "Project ID" , cli .EnvVar ("UNKEY_PROJECT_ID" )),
111108 cli .String ("keyspace-id" , "Keyspace ID for API key authentication" , cli .EnvVar (EnvKeyspaceID )),
112109 // Optional flags with defaults
113- cli .String ("context" , "Build context path" ),
110+ cli .String ("context" , "Build context path" , cli . Default ( "." ) ),
114111 cli .String ("branch" , "Git branch" , cli .Default (DefaultBranch )),
115112 cli .String ("docker-image" , "Pre-built docker image" ),
116113 cli .String ("dockerfile" , "Path to Dockerfile" , cli .Default (DefaultDockerfile )),
117114 cli .String ("commit" , "Git commit SHA" ),
118115 cli .String ("registry" , "Container registry" ,
119116 cli .Default (DefaultRegistry ),
120117 cli .EnvVar (EnvRegistry )),
121- cli .String ("env" , "Environment slug to deploy to" , cli .Default ("preview" )),
118+ cli .String ("env" , "Environment slug to deploy to" , cli .Default (DefaultEnvironment )),
122119 cli .Bool ("skip-push" , "Skip pushing to registry (for local testing)" ),
123120 cli .Bool ("verbose" , "Show detailed output for build and deployment operations" ),
124- cli .Bool ("linux" , "Build Docker image for linux/amd64 platform (for deployment to cloud clusters)" ),
121+ cli .Bool ("linux" , "Build Docker image for linux/amd64 platform (for deployment to cloud clusters)" , cli . Default ( true ) ),
125122 // Control plane flags (internal)
126123 cli .String ("control-plane-url" , "Control plane URL" , cli .Default (DefaultControlPlaneURL )),
127124 cli .String ("auth-token" , "Control plane auth token" , cli .Default (DefaultAuthToken )),
@@ -153,7 +150,6 @@ unkey deploy --init --config=./my-project # Initialize with custom location
153150unkey deploy --init --force # Force overwrite existing configuration
154151unkey deploy # Standard deployment (uses ./unkey.json)
155152unkey deploy --config=./production # Deploy from specific config directory
156- unkey deploy --workspace-id=ws_production_123 # Override workspace from config file
157153unkey deploy --context=./api # Deploy with custom build context
158154unkey deploy --skip-push # Local development (build only, no push)
159155unkey deploy --docker-image=ghcr.io/user/app:v1.0.0 # Deploy pre-built image
@@ -182,7 +178,6 @@ func DeployAction(ctx context.Context, cmd *cli.Command) error {
182178
183179 // Merge config with command flags (flags take precedence)
184180 finalConfig := cfg .mergeWithFlags (
185- cmd .String ("workspace-id" ),
186181 cmd .String ("project-id" ),
187182 cmd .String ("keyspace-id" ),
188183 cmd .String ("context" ),
@@ -194,7 +189,6 @@ func DeployAction(ctx context.Context, cmd *cli.Command) error {
194189 }
195190
196191 opts := DeployOptions {
197- WorkspaceID : finalConfig .WorkspaceID ,
198192 KeyspaceID : finalConfig .KeyspaceID ,
199193 ProjectID : finalConfig .ProjectID ,
200194 Context : finalConfig .Context ,
0 commit comments