33 lines
662 B
Makefile
33 lines
662 B
Makefile
.PHONY: build_all build_api build_webapp run logs start stop shell
|
|
|
|
build_all: build_api build_webapp
|
|
|
|
api_build:
|
|
docker build --tag bk_api -f ./bk_api/api.dockerfile ./bk_api/
|
|
|
|
webapp_build:
|
|
docker build --tag bk_webapp -f ./bk_webapp/webapp.dockerfile ./bk_webapp/
|
|
|
|
api_run:
|
|
docker run -d --name api -p 127.0.0.1:8000:8000 -v $(PWD)/bk_api/db.sqlite3:/opt/app/db.sqlite3 bk_api
|
|
|
|
webapp_run:
|
|
docker run -d --name webapp -p 127.0.0.1:3000:3000 bk_webapp
|
|
|
|
api_logs:
|
|
docker logs api --follow
|
|
|
|
api_start:
|
|
docker start api
|
|
|
|
api_stop:
|
|
docker stop api
|
|
|
|
api_shell:
|
|
docker exec -it api /bin/bash
|
|
|
|
api_manager:
|
|
docker exec -it api /bin/bash python ./manage.py
|
|
|
|
|