21 lines
423 B
Bash
21 lines
423 B
Bash
#!/bin/bash
|
|
|
|
set -o errexit
|
|
set -o pipefail
|
|
set -o nounset
|
|
|
|
# Aplica migrações antes de iniciar o servidor
|
|
python manage.py migrate
|
|
|
|
# Coleta arquivos estáticos
|
|
python manage.py collectstatic --noinput
|
|
|
|
python manage.py compress --force
|
|
|
|
# Inicia o servidor com Gunicorn
|
|
exec gunicorn config.wsgi:application \
|
|
--bind 0.0.0.0:8005 \
|
|
--workers 4 \
|
|
--timeout 120
|
|
# python manage.py runserver_plus 0.0.0.0:8005
|