Cron job container from webwurst/docker-go-cron to launch mantisbt-sync-core jobs
The following environment variables must be provided :
- BASE_URL=http://mantisbt-sync-core:8080/batch
- SCHEDULE : based on robfig/cron syntax. See here
- COMMAND=/mantis-sync-cron/tasks.sh , where is one of : syncEnumsJob, syncProjectsJob, syncIssuesJob, handlersStatJob
- MANTIS_USERNAME : user name used to connect to MantisBT. Left it empty if anonymous access is used
- MANTIS_PASSWORD : password used to connect to MantisBT. Left it empty if anonymous access is used
- MANTIS_PROJECT_ID : MantisBT project id
The following configuration will run issues sync job every 6 hours :
mantisbt-sync-cron:
image: jrrdev/mantisbt-sync-cron:latest
environment:
- BASE_URL=http://mantisbt-sync-core:8080/batch
- SCHEDULE=@every 6h
- COMMAND=/mantis-sync-cron/tasks.sh syncIssuesJob
- MANTIS_USERNAME=
- MANTIS_PASSWORD=
- MANTIS_PROJECT_ID=1
ports:
- "18080"
links:
- mantisbt-sync-core
** Note : the cron container can only launch one command. If multiple jobs scheduling is required, just add one container per job**