-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 933 Bytes
/
Makefile
File metadata and controls
36 lines (29 loc) · 933 Bytes
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
install:
#install commands
pip install --upgrade pip &&\
pip install -r requirements.txt
post-install:
python -m textblob.download_corpora
format:
#format the code
black *.py mylib/*.py
lint:
#py lint
pylint --disable=R,C *.py mylib/*.py
test:
#test code
python -m pytest -vv --cov=mylib --cov=main test_*.py
build:
# build docker image
# docker build -t deploy-fastapi .
docker build .
run:
# run docker file
docker run -p 127.0.0.1:8080:8080 53f8faee6c25
deploy:
#deploy
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 405399979532.dkr.ecr.ap-south-1.amazonaws.com
docker build -t fastapi-microservice .
docker tag fastapi-microservice:latest 405399979532.dkr.ecr.ap-south-1.amazonaws.com/fastapi-microservice:latest
docker push 405399979532.dkr.ecr.ap-south-1.amazonaws.com/fastapi-microservice:latest
all: install post-install format lint test deploy