Browse Source

[TOOLS] Add utility commands to the Makefile

remotes/upstream/experimental
Hugo Sales 1 year ago
parent
commit
11e52bcb27
Signed by: someonewithpc <hugo@hsal.es> GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 21 additions and 2 deletions
  1. +21
    -2
      Makefile

+ 21
- 2
Makefile View File

@@ -1,6 +1,25 @@
DIR=$(strip $(notdir $(CURDIR))) # Seems a bit hack-ish, but `basename` works differently

test:
.PHONY:
if ! docker info > /dev/null; then echo "Docker does not seem to be running"; exit 1; fi

up: .PHONY
docker-compose up -d

down: .PHONY
docker-compose down

php-repl: .PHONY
docker exec -it $(strip $(DIR))_php_1 sh -c '/var/www/social/bin/console psysh'

php-shell: .PHONY
docker exec -it $(strip $(DIR))_php_1 sh -c 'cd /var/www/social; sh'

psql-shell: .PHONY
docker exec -it $(strip $(DIR))_db_1 sh -c "psql -U postgres social"

test: .PHONY
cd docker/testing && docker-compose run php && docker-compose down

stop-test:
stop-test: .PHONY
cd docker/testing && docker-compose down

Loading…
Cancel
Save