forked from aiwithqasim/Capstone-Project-Devops
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 1.18 KB
/
Makefile
File metadata and controls
35 lines (26 loc) · 1.18 KB
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
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
setup: ## Create the virtial environment to run this project
python3 -m venv ~/.nano-devops-05
env: ## List the environment versions
which python3
python3 --version
which pytest
which pylint
lint: ## Check the validity of the project files
hadolint Dockerfile
pylint --load-plugins pylint_flask --disable=R,C app/*.py
test: ## Run the tests for this prject
@cd tests; pytest -vv --cov-report term-missing --cov=web test_*.py
install: ## Install the required imports for this project
pip install -r requirements.txt
docker-build: ## Build the docker image and list available docker images
docker build -t maweeks/nano-devops-05 .
docker image ls
docker-upload: ## Upload the docker image to AWS
$(aws ecr get-login --no-include-email --region us-east-1)
docker tag nano-devops-05:latest 119841056280.dkr.ecr.us-east-1.amazonaws.com/nano-devops-05:latest
docker push 119841056280.dkr.ecr.us-east-1.amazonaws.com/nano-devops-05
start-api: ## Run the python application locally
python web.py
all: install lint test