Skip to content

Commit

Permalink
add docker build and run commands to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
daveminer committed Aug 31, 2024
1 parent 4e3a21d commit 5f4049c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
app:
./manage.py runserver
build-app:
docker build --target webapp -t bert-serv .
build-worker:
docker build --target celery_worker -t bert-serv-worker .
coverage-html:
pytest --cov=. --cov-report=html
deps:
Expand All @@ -10,8 +14,18 @@ freeze:
pip3 freeze > requirements-freeze.txt
migrate:
./manage.py migrate
run-app:
docker run -d --name bert-serv --network host bert-serv
run-worker:
docker run -d --name bert-serv-worker --network host bert-serv-worker
services:
docker-compose up --detach celery_worker rabbitmq redis
stop-app:
docker stop bert-serv || true
docker rm bert-serv || true
stop-worker:
docker stop bert-serv-worker || true
docker rm bert-serv-worker || true
test:
pytest -s .
test-ci:
Expand Down

0 comments on commit 5f4049c

Please sign in to comment.