From 0f401211c308f5fc01063213007dba7248dd6a24 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 8 Feb 2023 13:01:40 +0100 Subject: Makefile: refactoring & cleanup --- Makefile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3