summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-01-20 13:35:01 +0530
committerBobby <[email protected]>2026-01-20 13:35:01 +0530
commit61d5f45189a40621bceeb14c6646031dd15ab6c2 (patch)
tree602c98f87d776a9088723ee3d5a27e61053cbc08 /Makefile
parentc8d0bbb5b54f5cec3ebb245f9a21d8a94b3bd944 (diff)
downloadcafe-61d5f45189a40621bceeb14c6646031dd15ab6c2.tar.xz
cafe-61d5f45189a40621bceeb14c6646031dd15ab6c2.zip
Implement database configuration and management with PostgreSQL support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9a00c39..261784a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
BINARY_NAME=cafe
BUILD_PATH=bin/$(BINARY_NAME)
MAIN_PATH=$(BINARY_NAME)/main.go
+COMPOSE_DEV=toolchain/docker-compose.dev.yml
-.PHONY: setup clean tidy build run dev test all
+.PHONY: setup clean tidy build run dev test postgres stop reset all
setup:
@echo "Setting up environment..."
@@ -39,6 +40,18 @@ test:
@echo "Running tests..."
@go test -v ./... || true
+postgres:
+ @echo "Starting database..."
+ @docker-compose -f $(COMPOSE_DEV) up -d
+
+stop:
+ @echo "Stopping database..."
+ @docker-compose -f $(COMPOSE_DEV) down
+
+reset:
+ @echo "Resetting database..."
+ @./scripts/reset.db.sh
+
all: setup clean build run
.SILENT: \ No newline at end of file