Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. docker_path = docker
  2. php_service_name = php-fpm
  3. usage:
  4. @echo "========== DEV environment =========="
  5. @echo
  6. @echo "make build - docker build"
  7. @echo "make up - docker up"
  8. @echo "make down - docker down"
  9. @echo "make clear - clear cache"
  10. @echo "make gulp - minimize static"
  11. @echo "make migrate - run migrations"
  12. @echo "make diff - run migrations diff"
  13. @echo "make bash - run bash"
  14. @echo
  15. @echo "========== TEST environment =========="
  16. @echo
  17. @echo "make test-migrate - run migrations"
  18. @echo "make test-fixtures - load fixtures"
  19. @echo "make test-codecept - run tests"
  20. build:
  21. cd $(docker_path) && docker-compose -p "balticrest" up --build -d
  22. up:
  23. cd $(docker_path) && docker-compose -p "balticrest" up -d
  24. down:
  25. cd $(docker_path) && docker-compose -p "balticrest" down
  26. clear:
  27. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) php ./bin/console cache:clear
  28. gulp:
  29. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) gulp
  30. migrate:
  31. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) php ./bin/console doctrine:migrations:migrate
  32. diff:
  33. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) php ./bin/console doctrine:migrations:diff
  34. bash:
  35. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) bash
  36. test-migrate:
  37. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) php ./bin/console doctrine:migrations:migrate --env=test
  38. test-fixtures:
  39. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) php ./bin/console doctrine:fixtures:load --env=test
  40. test-codecept:
  41. cd $(docker_path) && docker-compose -p "balticrest" exec $(php_service_name) php ./vendor/bin/codecept run