X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/967eed676fc83d15b26149047f353ac61faa8217..14ec0cc12d68e7f15fe3f3bb03c1ecfd06d0e6c3:/Makefile?ds=inline diff --git a/Makefile b/Makefile index 3956cf34c..98a68987c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ -.PHONY: deploy test +.PHONY: deploy test up down build shell logs restart + + +UID := $(shell id -u) +GID := $(shell id -g) deploy: src/wolnelektury/localsettings.py @@ -11,9 +15,28 @@ deploy: src/wolnelektury/localsettings.py .ONESHELL: test: cd src - coverage run --branch --source='.' ./manage.py test; true + python -Wall -m coverage run --branch --source='.' ./manage.py test; true coverage html -d ../htmlcov.new rm -rf ../htmlcov mv ../htmlcov.new ../htmlcov coverage report rm .coverage + + +up: + UID=$(UID) GID=$(GID) docker compose up --build -d + +down: + docker compose down + +build: + UID=$(UID) GID=$(GID) docker compose build + +shell: + UID=$(UID) GID=$(GID) docker compose run --rm web bash + +logs: + docker compose logs -f + +restart: + docker compose restart