2021-08-06 20:14:03 +09:00
|
|
|
DIR=$(strip $(notdir $(CURDIR))) # Seems a bit hack-ish, but `basename` works differently
|
2021-05-02 21:39:32 +09:00
|
|
|
|
2021-08-06 20:14:03 +09:00
|
|
|
.PHONY:
|
2021-08-19 01:25:23 +09:00
|
|
|
@if ! docker info > /dev/null; then echo "Docker does not seem to be running"; exit 1; fi
|
2021-08-06 20:14:03 +09:00
|
|
|
|
|
|
|
up: .PHONY
|
|
|
|
docker-compose up -d
|
|
|
|
|
|
|
|
down: .PHONY
|
|
|
|
docker-compose down
|
|
|
|
|
2021-08-17 06:07:24 +09:00
|
|
|
redis-shell:
|
|
|
|
docker exec -it $(strip $(DIR))_redis_1 sh -c 'redis-cli'
|
|
|
|
|
2021-08-06 20:14:03 +09:00
|
|
|
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"
|
|
|
|
|
2021-08-17 06:07:24 +09:00
|
|
|
database-force-schema-update:
|
|
|
|
docker exec -it $(strip $(DIR))_php_1 sh -c "/var/www/social/bin/console doctrine:schema:update --dump-sql --force"
|
|
|
|
|
2021-08-06 20:14:03 +09:00
|
|
|
test: .PHONY
|
2021-08-17 04:31:24 +09:00
|
|
|
cd docker/testing && docker-compose run php; docker-compose down
|
2021-05-02 23:49:34 +09:00
|
|
|
|
2021-08-06 20:14:03 +09:00
|
|
|
stop-test: .PHONY
|
2021-05-02 23:49:34 +09:00
|
|
|
cd docker/testing && docker-compose down
|