Skip to content

Commit

Permalink
Makefile: add Makefile for development purposes (bug 1894699) (#53)
Browse files Browse the repository at this point in the history
- add Makefile
- update compose file to support escaping from docker attach
  • Loading branch information
zzzeid authored May 2, 2024
1 parent 8beb8b1 commit c52e80b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Makefile
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 ||:
2 changes: 2 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ services:
lando:
build:
context: .
stdin_open: true
tty: true
image: lando
command: bash -c "
lando migrate &&
Expand Down

0 comments on commit c52e80b

Please sign in to comment.