summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-09-10 17:42:13 -0600
committermo khan <mo@mokhan.ca>2025-09-10 17:42:13 -0600
commitbbda943304fda76ab211be60f62163608bf6f261 (patch)
tree672a40e732bf263132e274d2478b45bf1c2cde36 /Makefile
parent9081607de417823e17ad966bf1ce73d298bb70f4 (diff)
chore: split the Procfile for each environment
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 6 insertions, 12 deletions
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 .