Run "python manage.py collectstatic" in Docker
This commit is contained in:
parent
28d76f534a
commit
1c42dd1651
1 changed files with 6 additions and 1 deletions
|
|
@ -6,6 +6,11 @@ set -e
|
||||||
# Debug
|
# Debug
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# 1. Collect static files
|
||||||
|
echo "Collect static files"
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
echo "Collect static files done"
|
||||||
|
|
||||||
# 2. Apply database migrations
|
# 2. Apply database migrations
|
||||||
echo "Apply database migrations"
|
echo "Apply database migrations"
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
|
|
@ -20,7 +25,7 @@ echo "Create cache table done"
|
||||||
num_cores=$(nproc --all)
|
num_cores=$(nproc --all)
|
||||||
workers=$((2 * num_cores + 1))
|
workers=$((2 * num_cores + 1))
|
||||||
|
|
||||||
# 3. Start server
|
# 4. Start server
|
||||||
echo "Starting server with $workers workers"
|
echo "Starting server with $workers workers"
|
||||||
gunicorn --workers=$workers --bind=0.0.0.0:8000 feedvault.wsgi:application --log-level=info --access-logfile=- --error-logfile=- --forwarded-allow-ips="172.*,192.*" --proxy-allow-from="172.*,192.*"
|
gunicorn --workers=$workers --bind=0.0.0.0:8000 feedvault.wsgi:application --log-level=info --access-logfile=- --error-logfile=- --forwarded-allow-ips="172.*,192.*" --proxy-allow-from="172.*,192.*"
|
||||||
echo "Bye, love you"
|
echo "Bye, love you"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue