Skip to content

Commit 6275333

Browse files
committed
Makefile: add makefile for development purposes (bug 1894699)
- add Makefile - update compose file to support escaping from docker attach
1 parent 0ead3d6 commit 6275333

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

Makefile

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
SHELL := /bin/bash
2+
DOCKER := $(shell which docker)
3+
DOCKER_COMPOSE := $(shell which docker-compose)
4+
5+
6+
.PHONY: help
7+
help:
8+
@$(DOCKER) --version
9+
@$(DOCKER_COMPOSE) --version
10+
@echo "usage: make <target>"
11+
@echo
12+
@echo "target is one of:"
13+
@echo " help show this message and exit"
14+
@echo " build build the docker image for lando"
15+
@echo " format run ruff and black on source code"
16+
@echo " test run the test suite"
17+
@echo " start run the application"
18+
@echo " stop stop the application"
19+
@echo " attach attach for debugging (ctrl-p ctrl-q to detach)"
20+
21+
.PHONY: test
22+
test:
23+
docker-compose run lando lando tests
24+
25+
.PHONY: format
26+
format:
27+
docker-compose run lando lando format
28+
29+
.PHONY: build
30+
build:
31+
docker-compose build
32+
33+
.PHONY: start
34+
start:
35+
docker-compose up -d
36+
37+
.PHONY: stop
38+
stop:
39+
docker-compose down
40+
41+
.PHONY: attach
42+
attach:
43+
-@docker-compose attach lando ||:

compose.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ services:
1616
lando:
1717
build:
1818
context: .
19+
stdin_open: true
20+
tty: true
1921
image: lando
2022
command: bash -c "
2123
lando migrate &&

0 commit comments

Comments
 (0)