Changeset View
Changeset View
Standalone View
Standalone View
services/swh-web/entrypoint.sh
Show All 12 Lines | *) | ||||
echo "Migrating db using ${DJANGO_SETTINGS_MODULE}" | echo "Migrating db using ${DJANGO_SETTINGS_MODULE}" | ||||
django-admin migrate --settings=${DJANGO_SETTINGS_MODULE} | django-admin migrate --settings=${DJANGO_SETTINGS_MODULE} | ||||
echo "Creating admin user" | echo "Creating admin user" | ||||
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@swh-web.org', 'admin')" | python3 -m swh.web.manage shell || true | echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@swh-web.org', 'admin')" | python3 -m swh.web.manage shell || true | ||||
echo "starting the swh-web server" | echo "starting the swh-web server" | ||||
exec gunicorn --bind 0.0.0.0:5004 \ | exec gunicorn --bind 0.0.0.0:5004 \ | ||||
--threads 2 \ | |||||
--workers 2 \ | |||||
--timeout 3600 \ | --timeout 3600 \ | ||||
swh.web.wsgi | swh.web.wsgi | ||||
esac | esac |