upstream V3 development https://www.gnusocial.rocks/v3
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.
 
 
 
 
 
 

43 lines
1.4 KiB

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