Is there a way to enforce starting services in a specific order? I am trying to do the following:
- Start Azure SQL Edge service
- Run SQL scripts to create database, schema, and tables (using mssql-tools image +
sqlcmd
) - Run a .net core app that processes SQL scripts to create/load data
I can get (1) and (2) working by following this solution. However, when I add (3) it seems to be created/run immediately after (2) even if I use depends_on: service_completed_successfully
.
I do not have control over the code in (3), so I cannot add wait checks in there that ensure the necessary database structure has been created.
It seems like podman-compose does not treat depends_on: service_completed_successfully
the same way that docker-compose does. I tried creating a compose file that just runs two shell scripts in order, and they both kick off at the same time despite setting one with a depends_on
the other.