@@ -38,8 +38,8 @@ Example: coolify service env sync abc123 --file .env.production`,
3838 }
3939
4040 isBuildTime , _ := cmd .Flags ().GetBool ("build-time" )
41- isPreview , _ := cmd .Flags ().GetBool ("preview" )
4241 isLiteral , _ := cmd .Flags ().GetBool ("is-literal" )
42+ isRuntime , _ := cmd .Flags ().GetBool ("runtime" )
4343
4444 // Parse the .env file
4545 envVars , err := parser .ParseEnvFile (filePath )
@@ -62,17 +62,17 @@ Example: coolify service env sync abc123 --file .env.production`,
6262 }
6363
6464 // Build a map of existing env vars by key
65- existingMap := make (map [string ]models.EnvironmentVariable )
65+ existingMap := make (map [string ]models.ServiceEnvironmentVariable )
6666 for _ , env := range existingEnvs {
6767 existingMap [env .Key ] = env
6868 }
6969
7070 // Separate into updates and creates
71- var toUpdate []models.EnvironmentVariableCreateRequest
72- var toCreate []models.EnvironmentVariableCreateRequest
71+ var toUpdate []models.ServiceEnvironmentVariableCreateRequest
72+ var toCreate []models.ServiceEnvironmentVariableCreateRequest
7373
7474 for _ , envVar := range envVars {
75- req := models.EnvironmentVariableCreateRequest {
75+ req := models.ServiceEnvironmentVariableCreateRequest {
7676 Key : envVar .Key ,
7777 Value : envVar .Value ,
7878 }
@@ -81,12 +81,12 @@ Example: coolify service env sync abc123 --file .env.production`,
8181 if cmd .Flags ().Changed ("build-time" ) {
8282 req .IsBuildTime = & isBuildTime
8383 }
84- if cmd .Flags ().Changed ("preview" ) {
85- req .IsPreview = & isPreview
86- }
8784 if cmd .Flags ().Changed ("is-literal" ) {
8885 req .IsLiteral = & isLiteral
8986 }
87+ if cmd .Flags ().Changed ("runtime" ) {
88+ req .IsRuntime = & isRuntime
89+ }
9090
9191 // Auto-detect multiline values
9292 if strings .Contains (envVar .Value , "\n " ) {
@@ -108,7 +108,7 @@ Example: coolify service env sync abc123 --file .env.production`,
108108 // Perform bulk update if there are vars to update
109109 if len (toUpdate ) > 0 {
110110 fmt .Printf ("Updating %d existing variables...\n " , len (toUpdate ))
111- bulkReq := & service. BulkUpdateEnvsRequest {
111+ bulkReq := & models. ServiceEnvBulkUpdateRequest {
112112 Data : toUpdate ,
113113 }
114114 _ , err := serviceSvc .BulkUpdateEnvs (ctx , uuid , bulkReq )
@@ -147,9 +147,9 @@ Example: coolify service env sync abc123 --file .env.production`,
147147 }
148148
149149 cmd .Flags ().StringP ("file" , "f" , "" , "Path to .env file (required)" )
150- cmd .Flags ().Bool ("build-time" , false , "Make all variables available at build time" )
151- cmd .Flags ().Bool ("preview" , false , "Make all variables available in preview deployments" )
150+ cmd .Flags ().Bool ("build-time" , true , "Make all variables available at build time (default: true)" )
152151 cmd .Flags ().Bool ("is-literal" , false , "Treat all values as literal (don't interpolate variables)" )
152+ cmd .Flags ().Bool ("runtime" , true , "Make all variables available at runtime (default: true)" )
153153
154154 return cmd
155155}
0 commit comments