Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions django-project/{{cookiecutter.project_dir}}/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,12 @@ services:
platform: linux/amd64
<<: [ *env ]
restart: always

worker:
image: {{cookiecutter.docker_organization}}/{{cookiecutter.docker_image}}:local
<<: [ *env ]
platform: linux/amd64
command: "worker"
depends_on:
- db
- redis
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ case "$1" in
django-admin migrate
django-admin runserver 0.0.0.0:8000
;;
"worker")
until pg_isready -h db -p 5432;
do echo "waiting for database"; sleep 2; done;
exec celery -A {{cookiecutter.package_name}} worker --loglevel=info
;;
"setup")
until pg_isready -h db -p 5432;
do echo "waiting for database"; sleep 2; done;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import django_stubs_ext as django_stubs

from .config.celery import app as celery_app # noqa
from .version import __version__

django_stubs.monkeypatch()
VERSION = __version__


__all__ = ["VERSION", "__version__"]
__all__ = ["VERSION", "__version__", "celery_app"]