-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[monitoring] Docker configuration added #274
Fixes #274
- Loading branch information
1 parent
d02db9c
commit 43e53ab
Showing
5 changed files
with
57 additions
and
21 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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
create_superuser() { | ||
local username="$1" | ||
local email="$2" | ||
|
@@ -16,8 +18,21 @@ else: | |
EOF | ||
} | ||
|
||
# Run migrations | ||
echo "Running database migrations..." | ||
python manage.py migrate --no-input | ||
|
||
# Create superuser if it doesn't exist | ||
echo "Creating superuser if it doesn't exist..." | ||
create_superuser admin [email protected] admin | ||
|
||
# Start Celery worker and beat in the background | ||
echo "Starting Celery worker..." | ||
celery -A openwisp2 worker -l info & | ||
|
||
echo "Starting Celery beat..." | ||
celery -A openwisp2 beat -l info & | ||
python manage.py runserver 0.0.0.0:8000 | ||
|
||
# Start the Django development server | ||
echo "Starting Django server..." | ||
exec python manage.py runserver 0.0.0.0:8000 |
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