Start two containers together


ms4sman

Recommended Posts

Hi all,

 

This is something I'm guessing is doable, but I didn't have luck trying to find anything about it, but I also wasn't sure how to word my search so there could still definitely be something out there I missed.

 

Basically, I have a Ghost blog container running, and it relies on my MariaDB container as well. In fact, if Ghost starts up and can't contact MariaDB, it shuts back down. 

This causes some inconveniences with the Community Applications Backup because it stops all containers, and then starts them again when finished.

 

This is great, and I understand the necessity, but unfortunately it means that in this specific case, Ghost comes up before MariaDB and then goes back down when it can't make contact, so most mornings, my Ghost docker is stopped when I get up.

 

I get that this is a super specific use case so I'm not expecting the CA Backup plugin to change, what I'm looking for is this: is there a way I can configure Ghost so that when it starts up, it first starts MariaDB, then itself after? Perhaps using the Extra Parameters field or something...

 

Thanks!

Link to comment

Doing some further research, I've found several further mentions of the CA Docker Autostart Manager plugin, which from my reading isn't around anymore as of server 6.6 or so. I found mentions of a new "wait" option that could be used to delay further apps from starting till the first one gets a chance to load up.

 

This might be useful, but I have found very little information on how to actually use it, and haven't been able to make it work yet. My other concern is this: is this "wait" honored by the CA Backup plugin when it is restarting the stopped dockers, or does it only actually get used when first enabling the Docker service after a reboot for example?

 

Thanks!

Link to comment
10 hours ago, ms4sman said:

Doing some further research, I've found several further mentions of the CA Docker Autostart Manager plugin, which from my reading isn't around anymore as of server 6.6 or so. I found mentions of a new "wait" option that could be used to delay further apps from starting till the first one gets a chance to load up.

 

This might be useful, but I have found very little information on how to actually use it, and haven't been able to make it work yet. My other concern is this: is this "wait" honored by the CA Backup plugin when it is restarting the stopped dockers, or does it only actually get used when first enabling the Docker service after a reboot for example?

 

Thanks!

You. can read about container auto-start settings in the online documentation.   Whether these are used by CA Backup I have no idea.

Link to comment
Just now, ms4sman said:

Interesting. Thanks for the link, that is helpful!

 

I don't seem to have the "wait" option though, even when I switch to Advanced View. Would my theme somehow be hiding that field?

 

I'll do some digging on my end.

Never mind, ignore me, I'm a complete idiot LOL.

 

I didn't have Auto-Start enabled on the Dockers when I was looking for this setting!

 

I'll see if this resolves my issues.

Link to comment

RESOLVED! 

 

Thanks @itimpi, your link helped!

 

So basically, I just needed to be paying attention to the Backup status log while it ran. I didn't realize that if you don't have dockers set to Auto-Start, it seems to just restart the ones that were running in alphabetical order. The Auto-Start order is only honored if it's actually enabled. In my case, I don't normally have anything auto-start with the server, so I didn't realize this. I also figured out how to use the "wait" command, although it's not necessary in this case. Now that I turned on Auto-Start, MariaDB is starting and fully up before Ghost is started anyway, and all seems well

 

Thanks!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.