Docker-compose restart after services rclone


I'm creating this topic to try to find a solution to a problem that annoys me for a long time, I'll explain.

I have all services running in docker compose (radarr, sonarr, qbittorrent, plex and emby)
I have rclone configured for my TeamDrive and also mergerFS to merge my SSD and TD.
The problem is that after a system reboot the docker always starts before tdrive.service and mergerfs.service and with that *arrs / Plex / Emby cannot see the directory. I need to manually restart compose after a machine reboot.

I've tried to put docker.service in Wants in tdrive and mergerfs services but without success.
In Requires of docker service I tried to put tdrive.service and mergerfs.service but without success as well.

Does anyone suggest something to me?

I use:

root@gemini:/etc/systemd/system# cat gmedia.service
Description=gmedia mergerfs mount

ExecStart=/usr/bin/mergerfs /cache:/GD /gmedia -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true


So it starts after rclone.

I also use it that way, and merger goes up after rclone's service.
The problem is the programs that are in docker-compose. They go up before rclone and mergerfs and therefore the merger directory /mnt/unionfs is empty

This was an issue for me early on, so I use cron jobs to start services accordingly at reboot. All services below are disabled (systemctl disable).

@reboot sleep 45 && sudo systemctl start rc-drive rc-crypt rc-crypt2
@reboot sleep 1m && sudo systemctl start docker