Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. FILE=tmp.prod.json
  2. DJANGO_ADMIN_USER=admin
  3. help:
  4. @echo "The following make targets are available:"
  5. @echo " * sass - Compile sass to css"
  6. @echo " * sass-watch - Compile sass to css on changes"
  7. @echo " * docker - Start the docker containers"
  8. @echo " * docker-init - Initialize docker containers"
  9. @echo " * docker-clean - Remove all docker containers"
  10. @echo " * docker-bash - Run a bash in web docker container"
  11. @echo " * docker-data - Load dumped data"
  12. @echo " * docker-migrate - Apply migrations to docker env"
  13. @echo " * docker-makemessages - Generate .po locale files"
  14. @echo " * docker-compilemessages - Generate .mo locale files"
  15. @echo " * docker-pw - Change django admin pw"
  16. @echo ""
  17. @echo ""
  18. @echo "If you're new to the project, run this to get started:"
  19. @echo ""
  20. @echo " make docker-init docker"
  21. @echo ""
  22. @echo "If you want to change any less files run this command:"
  23. @echo ""
  24. @echo " make dev-env less-watch"
  25. sass:
  26. @gulp sass
  27. sass-watch:
  28. @gulp sass:watch
  29. dev-env:
  30. @npm i
  31. docker:
  32. @docker-compose up --no-recreate
  33. docker-clean:
  34. @docker-compose kill
  35. @docker-compose rm -f
  36. docker-bash:
  37. @docker-compose run --rm web bash
  38. docker-init:
  39. @docker-compose run --rm web psql -h db -U postgres < tools/docker/cache_table.sql
  40. @docker-compose run --rm web app/manage.py migrate
  41. @docker-compose run --rm web app/manage.py loaddata tools/docker/user.json
  42. docker-data:
  43. @docker-compose run --rm web python app/manage.py flush --noinput
  44. @docker-compose run --rm web python app/manage.py loaddata /usr/src/app/${FILE}
  45. docker-migrate:
  46. @docker-compose run --rm web python app/manage.py migrate
  47. docker-makemessages:
  48. @docker-compose run --rm web python app/manage.py makemessages -a
  49. docker-compilemessages:
  50. @docker-compose run --rm web python app/manage.py compilemessages
  51. docker-pw:
  52. @docker-compose run --rm web python app/manage.py changepassword ${DJANGO_ADMIN_USER}