Serve Crello corpus aafdb0e86816 from the mounted bucket
Browse files- scripts/deploy_space.py +4 -1
scripts/deploy_space.py
CHANGED
|
@@ -68,7 +68,10 @@ def main(argv=None) -> int:
|
|
| 68 |
volumes = [v for v in (runtime.volumes or []) if v.mount_path != "/corpus"] if runtime else []
|
| 69 |
if args.transport == "mount":
|
| 70 |
volumes.append(Volume(type="bucket", source=bucket, mount_path="/corpus", read_only=True))
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
| 72 |
current = api.get_space_variables(args.space)
|
| 73 |
if args.transport == "http" and "DESIGN_CANVAS_SOURCE_ROOT" in current:
|
| 74 |
api.delete_space_variable(args.space, "DESIGN_CANVAS_SOURCE_ROOT")
|
|
|
|
| 68 |
volumes = [v for v in (runtime.volumes or []) if v.mount_path != "/corpus"] if runtime else []
|
| 69 |
if args.transport == "mount":
|
| 70 |
volumes.append(Volume(type="bucket", source=bucket, mount_path="/corpus", read_only=True))
|
| 71 |
+
if volumes:
|
| 72 |
+
api.set_space_volumes(args.space, volumes=volumes)
|
| 73 |
+
elif runtime and runtime.volumes:
|
| 74 |
+
api.delete_space_volumes(args.space) # the Hub refuses an empty list
|
| 75 |
current = api.get_space_variables(args.space)
|
| 76 |
if args.transport == "http" and "DESIGN_CANVAS_SOURCE_ROOT" in current:
|
| 77 |
api.delete_space_variable(args.space, "DESIGN_CANVAS_SOURCE_ROOT")
|