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:
|
2021-10-15 09:17:26 +00:00
|
|
|
$(python) tubesync/manage.py runserver
|
2020-11-24 07:18:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
build:
|
2021-10-15 09:17:26 +00:00
|
|
|
mkdir -p tubesync/media
|
|
|
|
mkdir -p tubesync/static
|
|
|
|
$(python) tubesync/manage.py collectstatic --noinput
|
2020-11-24 07:18:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2021-10-15 09:17:26 +00:00
|
|
|
rm -rf tubesync/static
|
2020-11-24 07:18:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
2023-11-30 07:49:58 +00:00
|
|
|
stopcontainer:
|
|
|
|
$(docker) stop $(name)
|
|
|
|
|
|
|
|
|
2022-09-04 01:58:13 +00:00
|
|
|
test: build
|
2021-04-04 12:16:22 +00:00
|
|
|
cd tubesync && $(python) manage.py test --verbosity=2 && cd ..
|
2023-06-29 13:30:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
shell:
|
|
|
|
cd tubesync && $(python) manage.py shell
|