ops: add dockerfile, makefile and cli tools

This commit is contained in:
2026-04-06 07:03:52 +02:00
parent 1ab6f57aa4
commit ab6b0b8840
5 changed files with 290 additions and 0 deletions

26
Makefile Normal file
View File

@@ -0,0 +1,26 @@
.PHONY: dev build test migrate sqlc create-user
dev:
air
build:
go build -o main_server ./cmd/server
test:
go test ./...
migrate:
sqlite3 malago.db < migrations/001_init.sql
sqlc:
sqlc generate
templ:
templ generate
create-user:
@if [ -z "$(EMAIL)" ] || [ -z "$(PASSWORD)" ]; then \
echo "Usage: make create-user EMAIL=your@email.com PASSWORD=yourpassword"; \
else \
go run ./cmd/create-user -email=$(EMAIL) -password=$(PASSWORD); \
fi