Add backups, currencies and dashboard APIs, and scope access by guard_name.
Web users may only CRUD their own records, operators stay in assigned branches, and admin/manager/superadmin keep full access. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
Makefile
20
Makefile
@@ -19,3 +19,23 @@ seed:
|
||||
# migrate -database 'postgresql://bank_admin:bank%40%2323%23%40_password@localhost:5454/bank_db?sslmode=disable' -path db/migrations up
|
||||
# migrate-rollback:
|
||||
# migrate -database 'postgresql://bank_admin:bank%40%2323%23%40_password@localhost:5454/bank_db?sslmode=disable' -path db/migrations down
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Deploy: build + upload only (PM2-ni serwerde özüň restart et)
|
||||
# ---------------------------------------------------------------------------
|
||||
DEPLOY_HOST ?= ubuntu@216.250.10.141
|
||||
DEPLOY_DIR ?= /home/ubuntu
|
||||
BINARY ?= myapp
|
||||
|
||||
.PHONY: build-linux deploy swagger
|
||||
|
||||
swagger:
|
||||
swag init -g app.go
|
||||
|
||||
build-linux:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o $(BINARY) ./app.go
|
||||
|
||||
deploy: build-linux
|
||||
ssh $(DEPLOY_HOST) 'mkdir -p $(DEPLOY_DIR)'
|
||||
scp ./$(BINARY) $(DEPLOY_HOST):$(DEPLOY_DIR)/$(BINARY).new
|
||||
ssh $(DEPLOY_HOST) 'cd $(DEPLOY_DIR) && chmod +x $(BINARY).new && mv $(BINARY).new $(BINARY)'
|
||||
|
||||
Reference in New Issue
Block a user