Skip to content

Commit

Permalink
feature: add datadog logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Lees committed Feb 20, 2025
1 parent b0f5e47 commit d20262c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
web: python manage.py collectstatic --noinput && python manage.py migrate --noinput && ddtrace-run gunicorn config.wsgi --bind 0.0.0.0:$PORT
app: python manage.py migrate --noinput && ddtrace-run gunicorn config.wsgi --bind 0.0.0.0:$PORT
celery_worker: celery -A config worker -l DEBUG
celery_beat: celery -A config beat -l info -S django
app: ./entrypoints/app.sh
celery_worker: ./entrypoints/celery-worker.sh
celery_beat: ./entrypoints/celery-beat.sh
9 changes: 9 additions & 0 deletions entrypoints/app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

python manage.py migrate --noinput

if [[ "$COPILOT_ENVIRONMENT_NAME" == "dev" ]]; then
ddtrace-run gunicorn config.wsgi --bind 0.0.0.0:$PORT
else
gunicorn config.wsgi --bind 0.0.0.0:$PORT
fi
7 changes: 7 additions & 0 deletions entrypoints/celery-beat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

if [[ "$COPILOT_ENVIRONMENT_NAME" == "dev" ]]; then
ddtrace-run celery -A config beat -l info -S django
else
gunicorn celery -A config beat -l info -S django
fi
7 changes: 7 additions & 0 deletions entrypoints/celery-worker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

if [[ "$COPILOT_ENVIRONMENT_NAME" == "dev" ]]; then
ddtrace-run celery -A config worker -l DEBUG
else
celery -A config worker -l DEBUG
fi

0 comments on commit d20262c

Please sign in to comment.