Hi, I'm looking at Dagger as a replacement for Docker compose for local development. We use Docker Compose to start up service dependencies and expose them to the host. I'd like to have one dagger call command that starts up multiple services and runs them. This example code is what I'm thinking. Is there a way using the dagger call CLI to call multiple services up command at once, or a way to use the SDK to set up a functions like devDeps that starts them all?
@func()
postgresService(): Service {
return dag.container()
.from("postgres:16")
.withEnvVariable("POSTGRES_PASSWORD", "postgres")
.withExposedPort(5432)
.asService()
}
@func()
minioService(): Service {
return dag.container()
.from("minio/minio:latest")
.withEnvVariable("MINIO_ACCESS_KEY", "minioadmin")
.withEnvVariable("MINIO_SECRET_KEY", "minioadmin")
.withExposedPort(9000)
.withExec(["server", "/data", "--address", ":9000"])
.asService()
}
@func()
devDeps(): Service[] {
return [this.minioService(), this.postgresService()]
}
- I think we already support sub-selecting fields of arrays of objects, though there are UI quirks here and there, and