{"id":15469131,"url":"https://github.com/epwalsh/docker-celery","last_synced_at":"2025-05-07T19:26:26.198Z","repository":{"id":53882100,"uuid":"133832118","full_name":"epwalsh/docker-celery","owner":"epwalsh","description":":whale: A Docker image for a simple Python Celery application","archived":false,"fork":false,"pushed_at":"2023-03-15T19:36:40.000Z","size":8,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T13:26:53.577Z","etag":null,"topics":["celery","docker","python-celery"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/epwalsh/docker-celery/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epwalsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-17T15:19:51.000Z","updated_at":"2024-09-10T09:40:52.000Z","dependencies_parsed_at":"2024-10-23T20:36:40.902Z","dependency_job_id":"06816bee-00dd-40c6-92e7-87a0b89ebd3a","html_url":"https://github.com/epwalsh/docker-celery","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"b46df3331ec777ba1ae20ff5cd80a70c70618b63"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epwalsh%2Fdocker-celery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epwalsh%2Fdocker-celery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epwalsh%2Fdocker-celery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epwalsh%2Fdocker-celery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epwalsh","download_url":"https://codeload.github.com/epwalsh/docker-celery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252942675,"owners_count":21829113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","docker","python-celery"],"created_at":"2024-10-02T01:51:44.442Z","updated_at":"2025-05-07T19:26:26.170Z","avatar_url":"https://github.com/epwalsh.png","language":"Python","readme":"# docker-celery\n\nThis is a Docker image for Python Celery workers.\n\n## Details\n\n- Built on Alpine Linux for a super small image size.\n- The Celery process is managed by Supervisor, and is pointed to the application\nthrough an environment variable.\n- Other environment variables control the queue name, number of workers, and\nlog level.\n- Uses an external broker so the number of workers can be scaled up by simply scaling the number of containers.\n\n## Quick start example\n\nThis will show you how to get the\n[example application](https://github.com/epwalsh/docker-celery/tree/master/example)\nrunning.\n\nIn order to get started, you will need a message broker running, such as RabbitMQ.\nIf you don't already have one, you can get a free RabbitMQ instance for development\npurposes through [CloudAMQP](https://customer.cloudamqp.com/instance/create?plan=lemur).\nIt should only take a few minutes to set up.\n\nOnce you have one, take note of the AMQP URL, which will look something like this:\n`amqp://****:*****@donkey.rmqp.cloudamqp.com/****`.\n\nNow, if you haven't already, clone this repository and pull the Docker image:\n\n```\ngit clone https://github.com/epwalsh/docker-celery \u0026\u0026 cd docker-celery\ndocker pull epwalsh/docker-celery\n```\n\nNext, `cd` into the `example/` directory and create the environment file `access.txt`\nwith the AMQP URL:\n\n```\ncd example\ncp access.sample.txt access.txt\n```\n\nEdit the first line in `access.txt` so that `BROKER_URL` is set to your AMQP URL.\nNow build and run the image with\n\n```\ndocker build -t YOUR-NAME/celery-test .\ndocker run --env-file=./access.txt --rm YOUR-NAME/celery-test\n```\n\nIf everything works, the Celery worker should start and produce some messages\nlike this:\n\n```\n[2018-05-26 21:33:29,024: INFO/MainProcess] Connected to amqp://****:**@donkey.rmq.cloudamqp.com:****/****\n[2018-05-26 21:33:29,582: INFO/MainProcess] mingle: searching for neighbors\n[2018-05-26 21:33:31,737: INFO/MainProcess] mingle: all alone\n[2018-05-26 21:33:32,877: INFO/MainProcess] test_queue-worker@4e39494c2213 ready.\n```\n\nYou can now send a task to your worker with a Python script like this:\n\n```\nfrom celery import Celery\n\ncelery_app = Celery(\"example_app\", broker=\"amqp://****\")  # `broker` should be your BROKER_URL from access.txt\ncelery_app.send_task(\"worker.tasks.hello_world\", queue=\"test_queue\")\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepwalsh%2Fdocker-celery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepwalsh%2Fdocker-celery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepwalsh%2Fdocker-celery/lists"}