deck-chores
===========
.. image:: https://img.shields.io/docker/pulls/funkyfuture/deck-chores.svg
:target: https://hub.docker.com/r/funkyfuture/deck-chores/
.. image:: https://img.shields.io/pypi/v/deck-chores.svg
:target: https://pypi.org/project/deck-chores/
**A job scheduler for Docker containers, configured via container labels.**
* Documentation: https://deck-chores.readthedocs.io
* Image repositories:
* https://github.com/funkyfuture/deck-chores/pkgs/container/deck-chores
* https://hub.docker.com/r/funkyfuture/deck-chores
* Code repository: https://github.com/funkyfuture/deck-chores
* Issue tracker: https://github.com/funkyfuture/deck-chores/issues
* Free software: ISC license
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*:
.. code-block:: yaml
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 <https://docs.docker.com/engine/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:
* `APScheduler <https://apscheduler.readthedocs.io>`_ for managing jobs
* `cerberus <http://python-cerberus.org>`_ for processing metadata
* `docker-py <https://docker-py.readthedocs.io>`_ for Docker interaction
* `flake8 <http://flake8.pycqa.org/>`_, `mypy <http://mypy-lang.org>`_,
`pytest <http://pytest.org>`_ and `tox <https://tox.readthedocs.io>`_ for testing
* `Python <https://www.python.org>`_
Authors
-------
- Frank Sachsenheim (maintaining)
- aeri4list
- alpine-digger
- Brynjar Smári Bjarnason
- Garret Hohmann
Raw data
{
"_id": null,
"home_page": "https://github.com/funkyfuture/deck-chores",
"name": "deck-chores",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "docker, cron, scheduler, jobs, labels, metadata",
"author": "Frank Sachsenheim",
"author_email": "funkyfuture@riseup.net",
"download_url": "https://files.pythonhosted.org/packages/e9/24/f914d84917acca20e44d5571fa620707b8d3035462ac2fb8419e71809d0e/deck_chores-1.4.4.tar.gz",
"platform": null,
"description": "deck-chores\n===========\n\n.. image:: https://img.shields.io/docker/pulls/funkyfuture/deck-chores.svg\n :target: https://hub.docker.com/r/funkyfuture/deck-chores/\n\n.. image:: https://img.shields.io/pypi/v/deck-chores.svg\n :target: https://pypi.org/project/deck-chores/\n\n**A job scheduler for Docker containers, configured via container labels.**\n\n* Documentation: https://deck-chores.readthedocs.io\n* Image repositories:\n * https://github.com/funkyfuture/deck-chores/pkgs/container/deck-chores\n * https://hub.docker.com/r/funkyfuture/deck-chores\n* Code repository: https://github.com/funkyfuture/deck-chores\n* Issue tracker: https://github.com/funkyfuture/deck-chores/issues\n* Free software: ISC license\n\n\nFeatures\n--------\n\n- define regular jobs to run within a container context with container and optionally with image\n labels\n- use date, interval and cron-like triggers\n- set a maximum of simultaneously running instances per job\n- restrict job scheduling to one container per service\n- multi-architecture image supports ``amd64``, ``arm64`` and ``arm`` platforms\n (the latter are currently not provided for download)\n\n\nExample\n-------\n\nLet's say you want to dump the database of a Wordpress once a day. Here's a ``docker-compose.yml``\nthat defines a job that will be handled by *deck-chores*:\n\n.. code-block:: yaml\n\n version: \"3.7\"\n\n services:\n wordpress:\n image: wordpress\n mysql:\n image: mariadb\n volumes:\n - ./database_dumps:/dumps\n labels:\n deck-chores.dump.command: sh -c \"mysqldump --all-databases > /dumps/dump-$$(date -Idate)\"\n deck-chores.dump.interval: daily\n\nIt is however recommended to use scripts with a proper shebang for such actions. Their outputs to\n``stdout`` and ``stderr`` as well as their exit code will be logged by *deck-chores*.\n\n\nMaintenance\n-----------\n\nThe final release is supposed to receive monthly updates that includes updates\nof all updateable dependencies. If one is skipped, don't worry. When a second\nmaintenance release is skipped, feel free to open an issue to ask what the\nstatus is.\n\nYou can always build images upon an up-to-date base image with::\n\n make build\n\n\nLimitations\n-----------\n\nWhen running on a cluster of `Docker Swarm <https://docs.docker.com/engine/swarm/>`_\nnodes, each ``deck-chores`` instance can only observe the containers on the\nnode it's running on, and hence only restrict to run one job per service within\nthe node's context.\n\n\nAcknowledgements\n----------------\n\nIt wouldn't be as charming to write this piece of software without these projects:\n\n* `APScheduler <https://apscheduler.readthedocs.io>`_ for managing jobs\n* `cerberus <http://python-cerberus.org>`_ for processing metadata\n* `docker-py <https://docker-py.readthedocs.io>`_ for Docker interaction\n* `flake8 <http://flake8.pycqa.org/>`_, `mypy <http://mypy-lang.org>`_,\n `pytest <http://pytest.org>`_ and `tox <https://tox.readthedocs.io>`_ for testing\n* `Python <https://www.python.org>`_\n\n\nAuthors\n-------\n\n- Frank Sachsenheim (maintaining)\n- aeri4list\n- alpine-digger\n- Brynjar Sm\u00e1ri Bjarnason\n- Garret Hohmann\n\n",
"bugtrack_url": null,
"license": "ISC",
"summary": "Job scheduler for Docker containers, configured via container labels.",
"version": "1.4.4",
"project_urls": {
"Documentation": "https://deck-chores.readthedocs.org/",
"Homepage": "https://github.com/funkyfuture/deck-chores",
"Repository": "https://github.com/funkyfuture/deck-chores"
},
"split_keywords": [
"docker",
" cron",
" scheduler",
" jobs",
" labels",
" metadata"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1acc5145f8d888ed2cb1768860306aaf3b37f8db3e5666f195ffc728c7e4a711",
"md5": "543ab49c36e8e3580cb06c44fb9503b5",
"sha256": "710aca7f6d0e969f83aabac2109bf17828affc8d8c9273962ea813b2890e75af"
},
"downloads": -1,
"filename": "deck_chores-1.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "543ab49c36e8e3580cb06c44fb9503b5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 14630,
"upload_time": "2024-10-28T11:29:37",
"upload_time_iso_8601": "2024-10-28T11:29:37.296038Z",
"url": "https://files.pythonhosted.org/packages/1a/cc/5145f8d888ed2cb1768860306aaf3b37f8db3e5666f195ffc728c7e4a711/deck_chores-1.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e924f914d84917acca20e44d5571fa620707b8d3035462ac2fb8419e71809d0e",
"md5": "9a5de9f1af6cbaa1153a2779a378f423",
"sha256": "502dc96c2ee096174eddfcc8e436a91dc30d02b81edf8a7cd7d78f9b68b97185"
},
"downloads": -1,
"filename": "deck_chores-1.4.4.tar.gz",
"has_sig": false,
"md5_digest": "9a5de9f1af6cbaa1153a2779a378f423",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 13369,
"upload_time": "2024-10-28T11:29:39",
"upload_time_iso_8601": "2024-10-28T11:29:39.288016Z",
"url": "https://files.pythonhosted.org/packages/e9/24/f914d84917acca20e44d5571fa620707b8d3035462ac2fb8419e71809d0e/deck_chores-1.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 11:29:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "funkyfuture",
"github_project": "deck-chores",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "deck-chores"
}