-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic working Docker-Compose setup - postgres image & django image.
- Loading branch information
1 parent
a2f2eb2
commit 8a78c94
Showing
3 changed files
with
21 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
#!/bin/bash | ||
python manage.py migrate # Apply database migrations | ||
python manage.py collectstatic --noinput # Collect static files | ||
#python manage.py collectstatic --noinput # Collect static files | ||
|
||
# Prepare log files and start outputting logs to stdout | ||
touch /webapp/logs/gunicorn.log | ||
touch /webapp/logs/access.log | ||
tail -n 0 -f /webapp/logs/*.log & | ||
#touch /webapp/logs/gunicorn.log | ||
#touch /webapp/logs/access.log | ||
#tail -n 0 -f /webapp/logs/*.log & | ||
|
||
# Start Gunicorn processes | ||
echo Starting Gunicorn. | ||
exec gunicorn nadine.wsgi:application \ | ||
--name nadine_django \ | ||
--bind 0.0.0.0:8000 \ | ||
--workers 3 \ | ||
--log-level=info \ | ||
--log-file=/webapp/logs/gunicorn.log \ | ||
--access-logfile=/webapp/logs/access.log \ | ||
"$@" | ||
#echo Starting Gunicorn. | ||
#exec gunicorn nadine.wsgi:application \ | ||
# --name nadine_django \ | ||
# --bind 0.0.0.0:8000 \ | ||
# --workers 3 \ | ||
# --log-level=info \ | ||
# --log-file=/webapp/logs/gunicorn.log \ | ||
# --access-logfile=/webapp/logs/access.log \ | ||
# "$@" | ||
|
||
python manage.py runserver 0.0.0.0:8000 |