Skip to content

wunderwerkio/docker-drupal-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Docker Drupal Cron

A lightweight Docker setup for running Drupal cron jobs via HTTP requests.

Overview

This project provides a containerized cron service that makes HTTP requests to trigger Drupal cron jobs. It's designed to work alongside a Drupal installation running in Docker containers.

Services

  • caddy: Web server serving Drupal
  • php-fpm: PHP-FPM service for Drupal
  • cron: Alpine-based container that periodically calls Drupal's cron endpoint

Configuration

Configure the cron service via environment variables:

environment:
  CRON_SCHEDULE: "*/1 * * * *"  # Run every minute (cron format)
  OPTIONS: "-s drupal/cron/__drupal-cron-hash__"  # Curl options and URL

Usage

Start all services:

docker-compose up -d

Run cron immediately:

docker-compose exec cron /start.sh now

View cron logs:

docker-compose logs -f cron

Setup

  1. Update OPTIONS environment variable with your Drupal cron URL
  2. Adjust CRON_SCHEDULE as needed
  3. Start the services with docker-compose up -d

The cron service will automatically begin making requests to your Drupal installation based on the configured schedule.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published