Answer the question
In order to leave comments, you need to log in
How to run 2 processes in docker container?
You need to run both flask and the daemon to clean up files generated by the flask application.
Tried like this but doesn't work:
FROM ubuntu:18.04
...
CMD python3 daemon_clean_wav.py start
CMD gunicorn --access-logfile - -w 4 --bind 0.0.0.0:5000 controller:app --timeout 15000
Answer the question
In order to leave comments, you need to log in
CMD's are simply arguments that are used by default when starting a container, the last CMD overwrites the previous one.
in general, to run processes in parallel, you can connect commands with an ampersand - &
However, it is better not to do this, hypothetically this will create problems when limiting resources per container, and difficulties when scaling containers.
Well, plus the containers themselves are processes, just with certain layers of insulation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question