base container and build process, more django
This commit is contained in:
33
Makefile
Normal file
33
Makefile
Normal file
@@ -0,0 +1,33 @@
|
||||
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:
|
||||
$(docker) run --rm --name $(name) --env-file dev.env --log-opt max-size=50m -ti -p 8080:8080 $(image)
|
||||
|
||||
|
||||
test:
|
||||
$(python) app/manage.py test --verbosity=2
|
||||
Reference in New Issue
Block a user