Question: I am getting this issue while re-build and re-start `cookiecutter-django` `docker-compose` in production. I am able to solve this by either removing all stopped docker containers or by adding `rm -f './celerybeat.pid'` in `/compose/production/django/celery/beat/start.sh` similar to `/compose/local/django/celery/beat/start.sh`. Is there any reason for not including this specific code in production version of compose file?

Answer: 
Please, take a look here:

[Disable pidfile for celerybeat](https://stackoverflow.com/questions/10876246/disable-pidfile-for-celerybeat/17674248#17674248)

You can specify pidfile without any location, so that it will be recreated each time the celery starts

```
--pidfile=

```
You can use `celery worker --pidfile=/path/to/celeryd.pid` to specify a non mounted path so that it is not mirror on the host.