-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1332 from maykinmedia/feature/1.18.x-docker-love
Backported Docker and Celery fixes
- Loading branch information
Showing
19 changed files
with
298 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
12 | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
LOGLEVEL=${CELERY_LOGLEVEL:-INFO} | ||
|
||
mkdir -p celerybeat | ||
|
||
# Adding the database scheduler will also convert the CELERY_BEAT_SCHEDULE to | ||
# database entries. | ||
|
||
echo "Starting celery beat" | ||
exec celery --workdir src --app "open_inwoner.celery" beat \ | ||
-l $LOGLEVEL \ | ||
-s ../celerybeat/beat \ | ||
--scheduler django_celery_beat.schedulers:DatabaseScheduler \ | ||
--pidfile= # empty on purpose, see https://github.com/open-formulieren/open-forms/issues/1182 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
LOGLEVEL=${CELERY_LOGLEVEL:-INFO} | ||
|
||
# This monitors the tasks executed by Celery. The Celery worker needs to be | ||
# started with the -E option to sent out the events. | ||
|
||
echo "Starting celery events" | ||
exec celery --workdir src --app "open_inwoner.celery" events \ | ||
-l $LOGLEVEL \ | ||
--camera django_celery_monitor.camera.Camera \ | ||
--frequency=2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# setup initial configuration using environment variables | ||
# Run this script from the root of the repository | ||
|
||
set -e | ||
|
||
# Figure out abspath of this script | ||
SCRIPT=$(readlink -f "$0") | ||
SCRIPTPATH=$(dirname "$SCRIPT") | ||
|
||
${SCRIPTPATH}/wait_for_db.sh | ||
|
||
src/manage.py migrate | ||
src/manage.py setup_configuration --no-selftest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Wait for the database container | ||
# See: https://docs.docker.com/compose/startup-order/ | ||
export PGHOST=${DB_HOST:-db} | ||
export PGPORT=${DB_PORT:-5432} | ||
|
||
until pg_isready; do | ||
>&2 echo "Waiting for database connection..." | ||
sleep 1 | ||
done | ||
|
||
>&2 echo "Database is up." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.