Skip to content

Commit

Permalink
New make actions: drush and logs
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Mar 29, 2018
1 parent b11904c commit 63a78c1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docker.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
include .env

.PHONY: up down stop prune ps shell
.PHONY: up down stop prune ps shell drush logs

default: up

DRUPAL_ROOT ?= /var/www/html/web

up:
@echo "Starting up containers for $(PROJECT_NAME)..."
docker-compose pull --parallel
Expand All @@ -24,3 +26,13 @@ ps:

shell:
docker exec -ti $(shell docker ps --filter name='$(PROJECT_NAME)_php' --format "{{ .ID }}") sh

drush:
docker exec $(shell docker ps --filter name='$(PROJECT_NAME)_php' --format "{{ .ID }}") drush -r $(DRUPAL_ROOT) $(filter-out $@,$(MAKECMDGOALS))

logs:
@docker-compose logs -f $(filter-out $@,$(MAKECMDGOALS))

# https://stackoverflow.com/a/6273809/1826109
%:
@:

0 comments on commit 63a78c1

Please sign in to comment.