-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: add Makefile for development purposes (bug 1894699) (#53)
- add Makefile - update compose file to support escaping from docker attach
- Loading branch information
Showing
2 changed files
with
45 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,43 @@ | ||
SHELL := /bin/bash | ||
DOCKER := $(shell which docker) | ||
DOCKER_COMPOSE := $(shell which docker-compose) | ||
|
||
|
||
.PHONY: help | ||
help: | ||
@$(DOCKER) --version | ||
@$(DOCKER_COMPOSE) --version | ||
@echo "usage: make <target>" | ||
@echo | ||
@echo "target is one of:" | ||
@echo " help show this message and exit" | ||
@echo " build build the docker image for lando" | ||
@echo " format run ruff and black on source code" | ||
@echo " test run the test suite" | ||
@echo " start run the application" | ||
@echo " stop stop the application" | ||
@echo " attach attach for debugging (ctrl-p ctrl-q to detach)" | ||
|
||
.PHONY: test | ||
test: | ||
docker-compose run lando lando tests | ||
|
||
.PHONY: format | ||
format: | ||
docker-compose run lando lando format | ||
|
||
.PHONY: build | ||
build: | ||
docker-compose build | ||
|
||
.PHONY: start | ||
start: | ||
docker-compose up -d | ||
|
||
.PHONY: stop | ||
stop: | ||
docker-compose down | ||
|
||
.PHONY: attach | ||
attach: | ||
-@docker-compose attach lando ||: |
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