2020-11-24 07:18:39 +00:00
|
|
|
python=/usr/bin/env python
|
|
|
|
docker=/usr/bin/docker
|
|
|
|
name=tubesync
|
|
|
|
image=$(name):latest
|
|
|
|
|
|
|
|
|
|
|
|
all: clean build
|
|
|
|
|
|
|
|
|
|
|
|
dev:
|
|
|
|
$(python) app/manage.py runserver
|
|
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
mkdir -p app/media
|
|
|
|
mkdir -p app/static
|
|
|
|
$(python) app/manage.py collectstatic --noinput
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf app/static
|
|
|
|
|
|
|
|
|
|
|
|
container: clean
|
|
|
|
$(docker) build -t $(image) .
|
|
|
|
|
|
|
|
|
|
|
|
runcontainer:
|
2020-12-13 05:13:30 +00:00
|
|
|
$(docker) run --rm --name $(name) --env-file dev.env --log-opt max-size=50m -ti -p 4848:4848 $(image)
|
2020-11-24 07:18:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
$(python) app/manage.py test --verbosity=2
|