Git Product home page Git Product logo

cronicle-docker's Introduction

Cronicle Docker

Drone (self-hosted) with branch Drone (self-hosted) with branch

Dockerised Cronicle, based on the Cronicle-Edge fork of Cronicle. This container was built to include features I value in containers, namely logging to stdout and configurable PUID and PGID.

This container can function in both the manager and worker role.

Links

This repo is mirrored to GitHub

Overview

Cronicle is a multi-server task scheduler and runner, with a web based front-end UI. It handles both scheduled, repeating and on-demand jobs, targeting any number of worker servers, with real-time stats and live log viewer. It's basically a fancy Cron replacement written in Node.js. You can give it simple shell commands, or write Plugins in virtually any language.

Main Screenshot

Features at a Glance

  • Single or multi-server setup.
  • Automated failover to backup servers.
  • Auto-discovery of nearby servers.
  • Real-time job status with live log viewer.
  • Plugins can be written in any language.
  • Schedule events in multiple timezones.
  • Optionally queue up long-running events.
  • Track CPU and memory usage for each job.
  • Historical stats with performance graphs.
  • Simple JSON messaging system for Plugins.
  • Web hooks for external notification systems.
  • Simple REST API for scheduling and running events.
  • API Keys for authenticating remote apps.

Tags

Tag Description
latest Latest image built from the main branch. Usually coincides with a tagged release.
develop Latest image built from the develop branch. Commits are made to the develop branch before being merged to main. Old versions of develop are removed after 14 days.

Tags relating to releases are also available, for locking in on a specific version.

Running

config.json, located in /config/cronicle/conf/config.json, is automatically generated on the first run of Cronicle in 'manager' mode. This file must be kept identical between the manager and any workers it controls.

If you want to configure Cronicle before first run (e.g to use a different storage engine), download config_sample.json and adjust accordingly before placing in /config/cronicle/conf/config.json. Make sure to change the secret!

โ— You must define the hostname of the container. Cronicle expects the hostname to remain the same, so the randomly-generated container hostname can cause problems if it changes. โ—

Docker CLI

docker run -d --name cronicle \
    --hostname cronicle-manager \
    -p 3012:3012 \
    -e MODE=manager \
    -e PUID=1000 \
    -e PGID=1000 \
    -e TZ=Europe/London \
    -v {path on host}:/config
    git.mrmeeb.stream/mrmeeb/cronicle:latest 

Docker Compose

version: '3'
services:
  cronicle:
    container_name: cronicle
    image: git.mrmeeb.stream/mrmeeb/cronicle:latest
    restart: unless-stopped
    hostname: cronicle-manager
    ports:
      - 3012:3012
    volumes:
      - {path on host}:/config
    environment:
      - MODE=manager
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London

Custom Scripts

This container automatically checks for scripts in /config/init and runs them at startup. This could be useful if you need to install additional applications into a worker container so it can execute jobs.

Note that any scripts will be run as root before permissions are altered in /app and /config. Anything that an init script does in either of these folders will be owned by cronicle when the container continues.

Reverse Proxying

For a single manager behind a reverse proxy, you may need to specify a specific route for the web-socket connections.

An example using nginx:

  location /socket.io/ {
        client_max_body_size                    2048m;
        proxy_read_timeout                      86400s;
        proxy_send_timeout                      86400s;
        proxy_set_header                        X-Forwarded-Host $host;
        proxy_set_header                        X-Forwarded-Server $host;
        proxy_set_header                        X-Real-IP $remote_addr;
        proxy_set_header                        Host $host;
        proxy_set_header                        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version                      1.1;
        proxy_redirect                          off;
        proxy_set_header                        Upgrade $http_upgrade;
        proxy_set_header                        Connection "upgrade"; 

    proxy_pass          http://localhost:3012/socket.io/;
  }

Source: jhuckaby/Cronicle#535

Load-balancing between multiple managers, as described here, has not been tested, and could behave strangely due to docker DNS.

Ports

Port Description
3012 WebUI and communication between manager and workers

Volumes

Mount Description
/config Persistent config file and job configurations

Environment Variables

Variable Options Default Description
MODE manager, worker manager Determines what mode Cronicle runs in
PUID int 1000 Sets the UID of the user Cronicle runs under
PGID int 1000 Sets the GID of the user Cronicle runs under
TZ List of valid TZs UTC Sets the timezone of the container and by extension Cronicle
LOG_LEVEL 1-10 9 Sets log level from 1 (quietest) to 10 (loudest)

cronicle-docker's People

Contributors

mrmeeb avatar

Stargazers

 avatar

Watchers

 avatar

cronicle-docker's Issues

Docker image is not work anymore

Hi, when I run docker pull git.mrmeeb.stream/mrmeeb/cronicle:latest. Docker throw a error:
Error response from daemon: missing signature key

How can I fix this ? Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.