2019-12-15 15:03:57 +01:00
|
|
|
.PHONY: build_all build_api build_webapp run logs start stop shell
|
2019-12-08 23:00:18 +01:00
|
|
|
|
2019-12-15 15:03:57 +01:00
|
|
|
build_all: build_api build_webapp
|
2019-12-08 23:00:18 +01:00
|
|
|
|
2019-12-15 15:03:57 +01:00
|
|
|
api_build:
|
2020-01-12 20:07:57 +01:00
|
|
|
docker build --tag bk_api -f ./bk_api/api.dockerfile ./bk_api/
|
2019-12-08 23:00:18 +01:00
|
|
|
|
2019-12-15 15:03:57 +01:00
|
|
|
webapp_build:
|
2020-01-12 20:07:57 +01:00
|
|
|
docker build --tag bk_webapp -f ./bk_webapp/webapp.dockerfile ./bk_webapp/
|
2019-12-15 15:03:57 +01:00
|
|
|
|
|
|
|
api_run:
|
2020-01-12 20:07:57 +01:00
|
|
|
docker run -d --name api -p 127.0.0.1:8000:8000 -v $(PWD)/bk_api/db.sqlite3:/opt/app/db.sqlite3 bk_api
|
2019-12-15 15:03:57 +01:00
|
|
|
|
|
|
|
webapp_run:
|
|
|
|
docker run -d --name webapp -p 127.0.0.1:3000:3000 bk_webapp
|
|
|
|
|
|
|
|
api_logs:
|
2019-12-08 23:00:18 +01:00
|
|
|
docker logs api --follow
|
|
|
|
|
2019-12-15 15:03:57 +01:00
|
|
|
api_start:
|
2019-12-08 23:00:18 +01:00
|
|
|
docker start api
|
|
|
|
|
2019-12-15 15:03:57 +01:00
|
|
|
api_stop:
|
2019-12-08 23:00:18 +01:00
|
|
|
docker stop api
|
2019-12-15 15:03:57 +01:00
|
|
|
|
|
|
|
api_shell:
|
|
|
|
docker exec -it api /bin/bash
|
2020-01-12 20:07:57 +01:00
|
|
|
|
|
|
|
api_manager:
|
|
|
|
docker exec -it api /bin/bash python ./manage.py
|
|
|
|
|
|
|
|
|