docker-compose-makefile

Makefile template for docker-compose

View on GitHub

Docker compose makefile

Build Status Release Commits since last release Github All Releases GitHub issues GitHub pull requests license GitHub stars

Template and lib for docker-compose

INSTALLATION

INSTALLATION

To install mk-lib run command

curl -sL https://git.io/vh4Gn | sh

UPGRADE

To upgrade existing mk-lib run command

make mk-upgrade

USAGE

Screen

Common (see samples)

From Makefile.minimal.mk (see samples)

From this library

VARIABLES

SAMPLES

Basic commands (you can copy and paste it into your Makefile)

up: ## Start all or c=<name> containers in foreground
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up $(c)

start: ## Start all or c=<name> containers in background
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d $(c)

stop: ## Stop all or c=<name> containers
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) stop $(c)

status: ## Show status of containers
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) ps

restart: ## Restart all or c=<name> containers
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) stop $(c)
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up $(c) -d

logs: ## Show logs for all or c=<name> containers
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) logs --tail=100 -f $(c)

clean: confirm ## Clean all data
	@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) down

You may see samples here

CUSTOMIZATION

You can create .make.env file in directory with Makefile or current directory

Available variables

TO-DO

CHANGELOG

See CHANGELOG

LICENSE

MIT (see LICENSE)

AUTHOR

Roman Kudlay ([email protected])