Add cron to official Docker image
Review Request #11669 — Created June 21, 2021 and submitted — Latest diff uploaded
Add cron to official Docker image
So long as the crontab is being generated, use it for a nice out-of-box experience with Docker and search.
Created fresh test instance
docker-compose
with equivalent changes to this review request.With the modified
docker-entrypoint.sh
in the same dir:
Dockerfile
FROM beanbag/reviewboard:4.0.2 RUN apt-get update && apt-get install -y cron ADD docker-entrypoint.sh /
docker-compose.yml
based ondocker-compose.mysql.yaml
... reviewboard: build: . environment: - REVIEWBOARD_CRONTAB=/site/conf/cron.conf ...
Start instance, and create search index with
docker-compose exec reviewboard /bin/bash -c 'gosu reviewboard rb-site manage /site rebuild_index'
Wait until the next cron run, and check the modified times in the search index e.g.docker-compose exec reviewboard /bin/bash -c 'ls -al /site/data/search-index/'