You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
500 B

  1. #!/usr/bin/env bash
  2. set -o errexit
  3. if [ "$1" = "build" ]; then
  4. cd app/server
  5. npm install --only=prod
  6. npm install --only=dev
  7. ./node_modules/.bin/webpack --config ./webpack.config.js --mode production
  8. echo "Done webpack build."
  9. ls ./static/bundle
  10. else
  11. python app/manage.py migrate
  12. python app/manage.py collectstatic --noinput
  13. python app/manage.py create_admin --noinput --username="$ADMIN_USER_NAME" --email="$ADMIN_CONTACT_EMAIL" --password="$ADMIN_PASSWORD"
  14. fi