Skip to content

Commit

Permalink
Add make logs commands
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Mar 29, 2018
1 parent 358f93d commit a505d33
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docker.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include .env

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

default: up

Expand All @@ -23,4 +23,11 @@ ps:
@docker ps --filter name='$(PROJECT_NAME)*'

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

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

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

0 comments on commit a505d33

Please sign in to comment.