Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. DIR=$(strip $(notdir $(CURDIR))) # Seems a bit hack-ish, but `basename` works differently
  2. .PHONY:
  3. @if ! docker info > /dev/null; then echo "Docker does not seem to be running"; exit 1; fi
  4. up: .PHONY
  5. docker-compose up -d
  6. down: .PHONY
  7. docker-compose down
  8. redis-shell:
  9. docker exec -it $(strip $(DIR))_redis_1 sh -c 'redis-cli'
  10. php-repl: .PHONY
  11. docker exec -it $(strip $(DIR))_php_1 sh -c '/var/www/social/bin/console psysh'
  12. php-shell: .PHONY
  13. docker exec -it $(strip $(DIR))_php_1 sh -c 'cd /var/www/social; sh'
  14. psql-shell: .PHONY
  15. docker exec -it $(strip $(DIR))_db_1 sh -c "psql -U postgres social"
  16. database-force-schema-update:
  17. docker exec -it $(strip $(DIR))_php_1 sh -c "/var/www/social/bin/console doctrine:schema:update --dump-sql --force"
  18. tooling-docker: .PHONY
  19. @cd docker/tooling && docker-compose up -d > /dev/null 2>&1
  20. test: tooling-docker
  21. docker exec tooling_php_1 /var/tooling/coverage.sh
  22. phpstan: tooling-docker
  23. docker exec tooling_php_1 /var/tooling/phpstan.sh
  24. stop-tooling: .PHONY
  25. cd docker/tooling && docker-compose down