-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd5635c
commit c7e8e39
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Thanks: https://gist.github.com/mpneuried/0594963ad38e68917ef189b4e6a269db | ||
.PHONY: help | ||
|
||
help: ## This help. | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
# Determine whether to use "docker-compose" or "docker compose" | ||
DOCKER_COMPOSE := $(shell which docker-compose 2>/dev/null) | ||
ifeq ($(DOCKER_COMPOSE),) | ||
DOCKER_COMPOSE := $(shell which docker 2>/dev/null) | ||
PREFIX := compose | ||
else | ||
PREFIX := | ||
endif | ||
|
||
# DOCKER TASKS | ||
up: ## Runs the containers in detached mode with default config | ||
$(DOCKER_COMPOSE) $(PREFIX) up -d --build | ||
|
||
clean: ## Stops and removes all containers | ||
$(DOCKER_COMPOSE) $(PREFIX) down | ||
|
||
logs: ## View the logs from the containers | ||
$(DOCKER_COMPOSE) $(PREFIX) logs -f | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Thanks: https://gist.github.com/mpneuried/0594963ad38e68917ef189b4e6a269db | ||
.PHONY: help | ||
|
||
help: ## This help. | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
# Determine whether to use "docker-compose" or "docker compose" | ||
DOCKER_COMPOSE := $(shell which docker-compose 2>/dev/null) | ||
ifeq ($(DOCKER_COMPOSE),) | ||
DOCKER_COMPOSE := $(shell which docker 2>/dev/null) | ||
PREFIX := compose | ||
else | ||
PREFIX := | ||
endif | ||
|
||
# DOCKER TASKS | ||
up: ## Runs the containers in detached mode with default config | ||
$(DOCKER_COMPOSE) $(PREFIX) up -d --build | ||
|
||
clean: ## Stops and removes all containers | ||
$(DOCKER_COMPOSE) $(PREFIX) down | ||
|
||
logs: ## View the logs from the containers | ||
$(DOCKER_COMPOSE) $(PREFIX) logs -f | ||
|