Coder Social home page Coder Social logo

casparjones / deck-chores Goto Github PK

View Code? Open in Web Editor NEW

This project forked from funkyfuture/deck-chores

0.0 0.0 0.0 723 KB

A job scheduler for Docker containers, configured via labels.

Home Page: https://deck-chores.readthedocs.io/

License: ISC License

Python 94.49% Makefile 4.63% Dockerfile 0.88%

deck-chores's Introduction

deck-chores

A job scheduler for Docker containers, configured via container labels.

Features

  • define regular jobs to run within a container context with container and optionally with image labels
  • use date, interval and cron-like triggers
  • set a maximum of simultaneously running instances per job
  • restrict job scheduling to one container per service
  • multi-architecture image supports amd64, arm64 and arm platforms (the latter are currently not provided for download)

Example

Let's say you want to dump the database of a Wordpress once a day. Here's a docker-compose.yml that defines a job that will be handled by deck-chores:

version: "3.7"

services:
  wordpress:
    image: wordpress
  mysql:
    image: mariadb
    volumes:
      - ./database_dumps:/dumps
    labels:
      deck-chores.dump.command: sh -c "mysqldump --all-databases > /dumps/dump-$$(date -Idate)"
      deck-chores.dump.interval: daily

It is however recommended to use scripts with a proper shebang for such actions. Their outputs to stdout and stderr as well as their exit code will be logged by deck-chores.

Maintenance

The final release is supposed to receive monthly updates that includes updates of all updateable dependencies. If one is skipped, don't worry. When a second maintenance release is skipped, feel free to open an issue to ask what the status is.

You can always build images upon an up-to-date base image with:

make build

Limitations

When running on a cluster of Docker Swarm nodes, each deck-chores instance can only observe the containers on the node it's running on, and hence only restrict to run one job per service within the node's context.

Acknowledgements

It wouldn't be as charming to write this piece of software without these projects:

Authors

  • Frank Sachsenheim (maintaining)
  • aeri4list
  • alpine-digger
  • Brynjar Smári Bjarnason
  • Garret Hohmann

deck-chores's People

Contributors

funkyfuture avatar dependabot[bot] avatar casparjones avatar andymadge avatar binnisb avatar shawak avatar intetnionaltypo avatar imfms avatar pyup-bot avatar

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.