Skip to content

Commit

Permalink
Add render.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnuma committed Apr 11, 2022
1 parent 5117ce4 commit 41378b1
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 12 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Celery on Render

This repo can be used to deploy the [Celery](https://github.com/celery/celery) distributed task queue on [Render](https://render.com). It also includes deployment instructions for [Flower](https://github.com/mher/flower), a web monitoring frontend for Celery.

This repo can be used to deploy the [Celery](https://github.com/celery/celery) distributed task queue on [Render](https://render.com).
It also includes deployment instructions for [Flower](https://github.com/mher/flower), a web monitoring frontend for Celery.

## Deployment
Fork this repo and click the button below to try it out:

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy)

Follow the guide at https://render.com/docs/deploy-celery.
Follow the guide at https://render.com/docs/deploy-celery for more information.
49 changes: 49 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
services:
- type: worker
name: queue
region: ohio
env: python
buildCommand: "pip install -r requirements.txt"
startCommand: "celery -A tasks worker -l info"
envVars:
- key: CELERY_BROKER_URL
fromService:
name: celery-redis
type: redis
property: connectionString
- key: PYTHON_VERSION
value: 3.9.12
- type: web
name: app
region: ohio
env: python
buildCommand: "pip install -r requirements.txt"
startCommand: "gunicorn app:app"
envVars:
- key: CELERY_BROKER_URL
fromService:
name: celery-redis
type: redis
property: connectionString
- key: PYTHON_VERSION
value: 3.9.12
- type: web
name: flower
region: ohio
env: python
buildCommand: "pip install -r requirements.txt"
startCommand: "celery flower -A tasks -l info"
envVars:
- key: CELERY_BROKER_URL
fromService:
type: redis
name: celery-redis
property: connectionString
- key: PYTHON_VERSION
value: 3.9.12
- type: redis
name: celery-redis
region: ohio
plan: starter
maxmemoryPolicy: noeviction # recommended policy for queues
ipAllowList: [] # only allow internal connections
40 changes: 31 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
celery==4.3.0
Flask==1.0.2
flower==0.9.3
gunicorn==19.9.0
redis==3.2.1

# NOTE: Kombu 4.6.5 results in a build failure. Bumping down to 4.6.4
# See this github issue: https://github.com/celery/kombu/issues/1063
kombu==4.6.4
amqp==5.1.0
async-timeout==4.0.2
billiard==3.6.4.0
celery==5.2.6
click==8.1.2
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
Deprecated==1.2.13
Flask==2.1.1
flower==1.0.0
gunicorn==20.1.0
humanize==4.0.0
importlib-metadata==4.11.3
itsdangerous==2.1.2
Jinja2==3.1.1
kombu==5.2.4
MarkupSafe==2.1.1
packaging==21.3
prometheus-client==0.14.1
prompt-toolkit==3.0.29
pyparsing==3.0.8
pytz==2022.1
redis==4.2.2
six==1.16.0
tornado==6.1
vine==5.0.0
wcwidth==0.2.5
Werkzeug==2.1.1
wrapt==1.14.0
zipp==3.8.0

0 comments on commit 41378b1

Please sign in to comment.