runtime
runtime copied to clipboard
The dependsOn behavior doesn't adapt to services linking to containers.
When using a container for development and optionally using a service the dependsOn fields need to be conditioned like so:
dependsOn: std.ifelse(args.atlas, ["nats"], ["nats", "mongo"])
Otherwise, the dependent containers will hang forever waiting for the container being replaced by a service to start. A complete example is the webhook-app.
https://github.com/lucj/acorn-services/tree/main/atlas#using-the-atlas-service-with-a-microservice-application
The expectation is that you wouldn't need to update dependencies based on using a service Acorn. The dependency should wait until the service Acorn finishes and has reached an OK state as far as Acorn is concerned.
a pain, but there's a work around. bumping