forked from TheSpaghettiDetective/obico-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (24 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.PHONY: build-web-base-1.1 build-images build-static frontdev-up vue-live vue-static shell dbshell
BASENAME = $(shell basename $(shell pwd) | tr '[:upper:]' '[:lower:]')
build-web-base-1.1:
docker build -t thespaghettidetective/web:base-1.1 -f web/Dockerfile.base web
build-images:
DOCKERFILE_VERSION=.dev docker-compose build --build-arg with_node=1 --build-arg user=user --build-arg group=user --build-arg uid=$(shell id -u) --build-arg gid=$(shell id -g)
build-web-and-tasks:
DOCKERFILE_VERSION=.dev docker-compose build --build-arg with_sqlite=1 --build-arg with_node=1 --build-arg user=user --build-arg group=user --build-arg uid=$(shell id -u) --build-arg gid=$(shell id -g) web tasks
build-static:
docker-compose run --rm --name $(BASENAME)_frontbuilder --no-deps web bash -c "cd frontend && yarn install && yarn build"
frontdev-up:
docker-compose run --rm --name $(BASENAME)_frontdev --no-deps -p 127.0.0.1:7070:7070 web bash -c "cd frontend && yarn install && yarn serve"
frontdev-lint:
docker-compose run --rm --name $(BASENAME)_frontdev --no-deps web bash -c "cd frontend && yarn install && yarn eslint --ext vue --ext js --fix src"
vue-live:
WEBPACK_LOADER_ENABLED=True DEBUG=True docker-compose up
vue-static:
WEBPACK_LOADER_ENABLED=False docker-compose up
shell:
docker-compose run --rm web python manage.py shell
dbshell:
docker-compose run --rm web python manage.py dbshell
lint:
cd web/frontend && yarn eslint --ext vue --ext js --fix src