@@ -105,7 +105,7 @@ def dump_project_yaml(project: MorphProject) -> str:
105
105
build_runtime = ""
106
106
build_framework = ""
107
107
build_package_manager = ""
108
- build_context = "# context: ."
108
+ build_context = "."
109
109
build_args_str = "\n # - ARG_NAME=value\n # - ANOTHER_ARG=value"
110
110
deployment_provider = "aws"
111
111
deployment_aws_region = "us-east-1"
@@ -121,32 +121,26 @@ def dump_project_yaml(project: MorphProject) -> str:
121
121
# Set values if build exists
122
122
if project .build :
123
123
if project .build .use_custom_dockerfile is not None :
124
- build_use_custom_dockerfile = str (project .build .use_custom_dockerfile )
124
+ build_use_custom_dockerfile = str (
125
+ project .build .use_custom_dockerfile
126
+ ).lower ()
125
127
if project .build .runtime :
126
128
build_runtime = project .build .runtime or ""
127
129
if project .build .framework :
128
130
build_framework = project .build .framework or ""
129
131
if project .build .package_manager :
130
132
build_package_manager = project .build .package_manager or ""
131
133
if project .build .context :
132
- build_context = project .build .context or "# context: ."
134
+ build_context = f" { project .build .context } " or "."
133
135
if project .build .build_args :
134
136
build_args_items = []
135
137
for key , value in project .build .build_args .items ():
136
138
build_args_items .append (f"{ key } ={ value } " )
137
139
build_args_str = (
138
- "\n - " .join (["" ] + build_args_items )
140
+ "\n # - " .join (["" ] + build_args_items )
139
141
if build_args_items
140
142
else "\n # - ARG_NAME=value\n # - ANOTHER_ARG=value"
141
143
)
142
- else :
143
- # Use default BuildConfig
144
- build_use_custom_dockerfile = "false"
145
- build_runtime = ""
146
- build_framework = ""
147
- build_package_manager = ""
148
- build_context = "# context: ."
149
- build_args_str = "\n # - ARG_NAME=value\n # - ANOTHER_ARG=value"
150
144
151
145
# Set values if deployment exists
152
146
if project .deployment :
@@ -176,7 +170,7 @@ def dump_project_yaml(project: MorphProject) -> str:
176
170
return f"""
177
171
# Cloud Settings
178
172
profile: { project .profile } # Defined in the Profile Section in `~/.morph/credentials`
179
- project_id: { project .project_id }
173
+ project_id: { project .project_id or "" }
180
174
181
175
# Framework Settings
182
176
default_connection: { project .default_connection }
@@ -192,8 +186,8 @@ def dump_project_yaml(project: MorphProject) -> str:
192
186
package_manager: { build_package_manager } # pip, poetry, uv
193
187
# These settings are required when use_custom_dockerfile is true
194
188
# They define how the Docker image will be built
195
- context: { build_context if build_context != " # context: ." else "# context: ." }
196
- build_args:{ build_args_str }
189
+ # context: { build_context }
190
+ # build_args:{ build_args_str }
197
191
198
192
# Deployment Settings
199
193
deployment:
0 commit comments