My Project bases on python-flask and celery with RabbitMq.
So I have to run 2 long services in the one container:
Two services:
1. gunicorn -w 64 -b 127.0.0.1:8888 manage:app
2. celery worker -A celery_worker.celery --loglevel=info
Those 2 services are both running as long time commands
I don't know how to write the Dockerfile to achieve my purpose.
I tried this:
CMD ["gunicorn -w 64 -b 127.0.0.1:8888 manage:app", "celery worker -A celery_worker.celery --loglevel=info"]
But it does not works.
Before I decided to use docker in my project, I used supervisor for execute those two commands simultaneously. But the supervisor has some problems in docker container which I couldn't solve(DETAIL).