-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
43 lines (32 loc) · 1.11 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
.PHONY: build run refresh
build:
pip install -r requirements.txt
run:
FLASK_APP=whydah.app:create_app FLASK_ENVIRONMENT=development FLASK_RUN_PORT=5100 flask run
refresh:
curl -X POST http://localhost:5100/config/refresh
get-service:
curl http://localhost:5100/config/service1
curl http://localhost:5100/config/superservice
update-service:
curl -X POST -H "Content-Type: application/json" -d '{"value": "newstring"}' http://localhost:5100/config/service1/feature1
test:
cd whydah/tests && pytest -v
reload-direnv:
direnv allow && direnv reload
loc:
cd whydah && find . -name '*.py' | xargs wc -l
build-image:
docker build -t whydah:latest .
run-image:
# remove old container if it's there
docker rm whydah || true
docker run --name whydah \
-e GIT_REPO_URL="https://github.com/ccollicutt/python-service-config-examples/" \
-p 8000:8000 whydah:latest
run-official-image:
# remove old container if it's there
docker rm whydah-official || true
docker run --name whydah-official \
-e GIT_REPO_URL="https://github.com/ccollicutt/python-service-config-examples/" \
-p 8000:8000 ghcr.io/ccollicutt/whydah:latest