title: Permission denied: '/code/celerybeat.pid'
body: <p>I can't run Celery beat using Docker.</p>
  
  <pre><code>celerybeat_1    | celery.platforms.LockFailed: [Errno 13] Permission 
  denied: '/code/celerybeat.pid'
  </code></pre>
  
  <p>docker service:</p>
  
  <pre><code>celerybeat:
   &lt;&lt;: *django
   depends_on:
    - postgres
    - redis
   command: /start-celerybeat.sh
  </code></pre>
  
  <p>start-celerybeat.sh</p>
  
  <pre><code>#!/bin/sh
  
  set -o errexit
  set -o nounset
  
  celery -A my_project.taskapp beat -l info --loglevel=debug --scheduler django_celery_beat.schedulers:DatabaseScheduler
  </code></pre>
  
  <p>How can I fix that?</p>