Skip to content

Modern Docker Management, Designed for Everyone

fix: Pass project object to StartOptions (#1010)

Chad Weimer048b3d63b216
diff --git a/backend/internal/utils/projects/cmds.go b/backend/internal/utils/projects/cmds.go
index 8b9f26320..2a046d2c1 100644
--- a/backend/internal/utils/projects/cmds.go
+++ b/backend/internal/utils/projects/cmds.go
@@ -31,6 +31,7 @@ func ComposeUp(ctx context.Context, proj *types.Project, services []string) erro
AssumeYes: true,
}
startOptions := api.StartOptions{
+ Project: proj,
Services: proj.ServiceNames(),
Wait: true,
}
diff --git a/tests/setup/project.data.ts b/tests/setup/project.data.ts
index f2ce31e5c..7a91e4860 100644
--- a/tests/setup/project.data.ts
+++ b/tests/setup/project.data.ts
@@ -1,14 +1,24 @@
-export const TEST_COMPOSE_YAML = `services:
+export const TEST_COMPOSE_YAML = `configs:
+ some_content:
+ content: |
+ This is a test config file.
+ It can contain multiple lines of text.
+ Used for testing purposes.
+
+services:
redis:
image: redis:latest
container_name: \${CONTAINER_NAME}
+ configs:
+ - source: some_content
+ target: /etc/some_content.txt
+ command: /bin/sh -c 'cat /etc/some_content.txt && redis-server'
ports:
- "8081:81"
- "6379:6379"
- "6378:6378"
volumes:
- redis_data:/data
- restart: unless-stopped
volumes:
redis_data:
diff --git a/tests/spec/project.spec.ts b/tests/spec/project.spec.ts
index 96d42e895..eae5e4f5e 100644
--- a/tests/spec/project.spec.ts
+++ b/tests/spec/project.spec.ts
@@ -210,6 +210,9 @@ test.describe('New Compose Project Page', () => {
const serviceBadge = page.locator('text=redis').first();
await expect(serviceBadge).toBeVisible();
+
+ const statusBadge = page.locator('text=Running').first();
+ await expect(statusBadge).toBeVisible();
});
});