tubesync/Makefile

34 lines
539 B
Makefile

python=/usr/bin/env python
docker=/usr/bin/docker
name=tubesync
image=$(name):latest
all: clean build
dev:
$(python) tubesync/manage.py runserver
build:
mkdir -p tubesync/media
mkdir -p tubesync/static
$(python) tubesync/manage.py collectstatic --noinput
clean:
rm -rf tubesync/static
container: clean
$(docker) build -t $(image) .
runcontainer:
$(docker) run --rm --name $(name) --env-file dev.env --log-opt max-size=50m -ti -p 4848:4848 $(image)
test:
cd tubesync && $(python) manage.py test --verbosity=2 && cd ..