aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-02-08 13:01:40 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-02-08 13:01:40 +0100
commit0f401211c308f5fc01063213007dba7248dd6a24 (patch)
treefe8b3a5249ba5bd5aacc55051176f8d08e681f40 /Makefile
parentMakefile: consistent recipe names (diff)
downloadvoid-0f401211c308f5fc01063213007dba7248dd6a24.tar.gz
void-0f401211c308f5fc01063213007dba7248dd6a24.zip
Makefile: refactoring & cleanup
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 10 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 176db0a..1d897f6 100644
--- a/Makefile
+++ b/Makefile
@@ -20,15 +20,15 @@ ifeq ($$(origin $(1)),command line)
endif
endef
-.PHONY: all
-all: serve
-
PORT ?= 23666
$(eval $(call noexpand,PORT))
URL := http://localhost:$(PORT)/
STATE := ./void.state
+.PHONY: all
+all: serve
+
.PHONY: serve
serve:
./server.py --port '$(call escape,$(PORT))' --void '$(call escape,$(STATE))'
@@ -45,21 +45,19 @@ view:
test:
./test/test.sh
-DOCKER_HOST ?= unix:///var/run/docker.sock
-$(eval $(call noexpand,DOCKER_HOST))
-export DOCKER_HOST
+.PHONY: build
+build: docker/build
-.PHONY: build/docker
-build/docker:
- docker-compose pull
+.PHONY: docker/build
+docker/build:
docker-compose build --pull
-.PHONY: serve/docker
-serve/docker: build/docker
+.PHONY: docker/serve
+docker/serve: build/docker
docker-compose up
.PHONY: deploy
-deploy: docker-build
+deploy: docker/build
docker-compose up -d
.PHONY: undeploy