From bbda943304fda76ab211be60f62163608bf6f261 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 10 Sep 2025 17:42:13 -0600 Subject: chore: split the Procfile for each environment --- Makefile | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 467479a..a25c683 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ SPICEDB := bin/spicedb TOOL := bin/tool ZED := bin/zed -.PHONY: clean setup build test run db-setup db-create db-stop db-reset +.PHONY: db-clean clean setup build test-schema test-unit test-race test-integration test build-image run run-image lint tidy db-schema-load db-seed db-stop db-reset db-init db-create db-migrate db-console db-setup $(AUTHZD_BIN): $(shell find . -name "*.go" 2>/dev/null) go.sum @$(GO) build -mod=vendor -o $(AUTHZD_BIN) ./cmd/authzd/main.go @@ -22,7 +22,7 @@ db-clean: @rm -rf tmp/postgres tmp/postgres.log clean: db-clean - @rm -f $(AUTHZD_BIN) $(SPARKLED_BIN) Procfile Procfile.dev + @rm -f $(AUTHZD_BIN) $(SPARKLED_BIN) @$(GO) clean -testcache setup: @@ -32,12 +32,6 @@ setup: fi @$(MISE) exec python -- pip install dumb-init -Procfile: Procfile.template - @grep -v "# DEV_ONLY:" Procfile.template > Procfile - -Procfile.dev: Procfile.template - @sed 's/# DEV_ONLY: //' Procfile.template > Procfile.dev - build: $(AUTHZD_BIN) $(SPARKLED_BIN) test-schema: @@ -54,14 +48,14 @@ test-integration: build-image test: clean test-unit test-race test-integration test-schema -build-image: Procfile +build-image: @$(DOCKER) build --network=host --tag $(IMAGE_TAG) . -run: clean build Procfile.dev db-init - @$(TOOL) godotenv -f .env.local,.env $(TOOL) minit -f Procfile.dev +run: clean build db-init + @$(TOOL) godotenv -f .env.local,.env $(TOOL) minit -f Procfile.development run-image: clean build-image - @$(DOCKER) run --rm --network host --env-file .env.local -p 10000:10000 -it $(IMAGE_TAG) + @$(DOCKER) run --rm --network host --env-file .env.local -v $(PWD)/Procfile.development:/Procfile -p 10000:10000 -it $(IMAGE_TAG) lint: @$(TOOL) yamlfmt -lint -exclude vendor . -- cgit v1.2.3