environment-ize configuration

This commit is contained in:
2021-07-02 18:47:14 -04:00
parent 04506ed01f
commit ca618cc609
5 changed files with 36 additions and 4 deletions

View File

@@ -1,17 +1,26 @@
.PHONY: up down
.PHONY: up down run
GOFILES=$(shell find . -name '*.go' -o -name 'go.*')
STATICFILES=$(shell find . -name '*.js' -o -name '*.css' -o -name '*.html')
SQLFILES=$(shell find . -name '*.sql')
ifneq (,$(wildcard ./local.properties))
include local.properties
export
endif
build: server manager
run: build
./server
server: $(GOFILES) $(STATICFILES)
go build -o server ./cmd/serve
manager: $(GOFILES) $(SQLFILES)
go build -o manager ./cmd/manage
# dev dependencies
up:
docker compose up -d