2021-08-06 12:14:03 +01:00
|
|
|
DIR=$(strip $(notdir $(CURDIR))) # Seems a bit hack-ish, but `basename` works differently
|
2021-05-02 13:39:32 +01:00
|
|
|
|
2021-08-06 12:14:03 +01:00
|
|
|
.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
|
2021-05-02 15:49:34 +01:00
|
|
|
cd docker/testing && docker-compose run php && docker-compose down
|
|
|
|
|
2021-08-06 12:14:03 +01:00
|
|
|
stop-test: .PHONY
|
2021-05-02 15:49:34 +01:00
|
|
|
cd docker/testing && docker-compose down
|