in regular setup, without Docker container I have the following use case:
- I install App1
- Run Database Command from my server to insert required rows in database before the App1 is started OR run the App2 which is installed on some other server and run App2 specific command with some predefined script before the App1 is started
- Start the App1 after one of two previous actions are being executed.
So now I have my App1 containerized and deployed. In it I have its EntryPoint to start the app (linux example) automatically:
/app1_start app1
BUT, if I haven't executed one of the two possible actions - either running the DatabaseSQL query or running the APP2 which is outside of the Docker cluster with its specific command to execute some script as prerequisite for starting the App1 - then I won't be able to start my App1 succesfully.
Can you please advise me what will be the best way how to achieve that after my App1 is being installed I either execute db commands or execute the external app command and then to have my EntryPoint commands executed for starting the App1 in container? I am just starting with Docker so please sorry if this is some basic question, I couldn't find similar use case but I suppose this is very regular situation for most of us. So I need something externally to be executed after I deploy my container on the server but before I run my containerized app with command in EntryPoint.
Thank you!