Hi,
I have encountered a peculiar issue. We have a following docker service setup (rough example):
services:
service1:
depends_on:
setup_service:
condition: service_completed_successfully
service2:
depends_on:
setup_service:
condition: service_completed_successfully
service3:
depends_on:
setup_service:
condition: service_completed_successfully
setup_service:
...
The setup service does some crucial setup steps and other services must not start before it.
The issue is that after the OTA through torizon cloud, aktualizr service runs all the service with docker-compose up, and once all services are up, removes all the stopped containers and dangling images with docker system prune -a. However, this also inadvetedly removes the setup_container as by the time all the other containers are running it is stopped, and so docker compose has to pull that container again after reboot.
So is the only way around that to change dependency condition to service_healthy and implement a healthcheck that confirms that setup is complete, while keeping the setup container running and being idle?
Is using the service_completed_successfully dependency so rare that noone else encountered this issue using torizonOS ? Or am i missing something?
I’ve seen some older posts having issues with aktualizr using hard coded docker-compose commands. Is it maybe possible to make them configurable? As for some unrelated functionality I was contemplating using docker profiles, however again because of aktualizr hard coded docker compose up commands, I had to abandon that idea.