generated from VEuPathDB/vdi-plugin-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
45 lines (38 loc) · 1.01 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
IMAGE_NAME := $(shell grep 'name:' Jenkinsfile | sed "s/.\+'\(.\+\)'.\+/\1/g")
default:
@echo "Usage:"
@echo " make build"
@echo
@echo " Builds the docker image for local use."
@echo
@echo " make start"
@echo
@echo " Starts the project's docker image as a background container."
@echo
@echo " make stop"
@echo
@echo " Shuts down a running background container for this project."
@echo
@echo " make shell"
@echo
@echo " Opens a bash session in a running instance of this project's docker image."
@echo
@echo " make logs"
@echo
@echo " Attaches to the log output of a running instance of this project's docker image."
build:
@docker compose build
start:
@docker compose up -d
stop:
@docker compose down -v
shell:
@docker exec -it $(IMAGE_NAME)-plugin-1 bash
logs:
@docker logs -f $(IMAGE_NAME)-plugin-1
.PHONY: venv
venv:
@python3 -m venv .venv
@. .venv/bin/activate; pip install -r pip-requirements.txt
@echo
@echo "run '. .venv/bin/activate' to enable the virtual environment"