php - How to automatically run the queue consumer process in a docker container?
仅有的幸福
仅有的幸福 2017-06-23 09:11:54
0
1
1048

I want to automatically run the PHP script of the queue consumer after the docker container is started. How should I write this Dockerfile? How to ensure that if this php script hangs, it can be automatically restarted?

Or is there any better solution?

仅有的幸福
仅有的幸福

reply all(1)
扔个三星炸死你

If the container only has queue consumers and no other services, then directly use docker’s restart mechanism and specify --restart=always when starting.

If you want to put multiple services in one container, use supervisor.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template