Running Two infinite commands on single pod/image I have a Dockerfile with a CMD, it calls a .sh file that runs a Django app
( makemigrations, migrate and uwsgi )
And that runs fine in a pod.

There's a django admin script that runs infinitely that I'd like to run in the same pod.


Per the docker docs I can't have a second command in the Dockerfile
Adding the script on the sh file wouldn't work because the both processes ( the app or command script ) are running and don't end so the second one never runs.


If I go in the pod and run exec -it bash to manually run the script i can't leave the pod without killing the process (Ctrl-C) or can  I? 



Any suggestions?
Though it's not advised to have multiple processes inside a container, but you have 2 options:

Use a process manager like supervisord or wrapper script to use as CMD (meta code)

start_first_process_in_bg
if START_FAILED
  exit
start_second_process_in_bg
if START_FAILED
  exit

while sleep 5; do
  check_first_process
  check_second_process

  if ANY_PROCESS_FAILED; then
    exit