feat: Add seed command support to preview deployments
Run project-specific initialization commands (DB migrations, fixture loading, etc.) automatically after containers are healthy, before the preview is marked ready. Configured via per-service `seed` arrays in .cw-preview.yml.
This commit is contained in:
@@ -101,6 +101,7 @@ export function parseCwPreviewConfig(raw: string): PreviewConfig {
|
||||
...(svc.healthcheck !== undefined && { healthcheck: svc.healthcheck as PreviewServiceConfig['healthcheck'] }),
|
||||
...(svc.env !== undefined && { env: svc.env as Record<string, string> }),
|
||||
...(svc.volumes !== undefined && { volumes: svc.volumes as string[] }),
|
||||
...(Array.isArray(svc.seed) && { seed: svc.seed as string[] }),
|
||||
...(svc.dev !== undefined && {
|
||||
dev: {
|
||||
image: (svc.dev as Record<string, unknown>).image as string,
|
||||
|
||||
Reference in New Issue
Block a user