Добавил каркас приложения

This commit is contained in:
2026-06-14 11:17:01 +03:00
parent a48f39d7f0
commit ed4b4fb15e
25 changed files with 824 additions and 8 deletions
+28
View File
@@ -0,0 +1,28 @@
BINARY := jellybit
PKG := ./cmd/jellybit
.PHONY: build run test lint tidy image clean
# Статический бинарь для сервера (Intel N150 = linux/amd64).
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o $(BINARY) $(PKG)
# Локальный запуск (нужен ./config.toml с db_path -> ./jellybit.db).
run:
go run $(PKG) --config ./config.toml
test:
go test ./...
lint:
golangci-lint run
tidy:
go mod tidy
# Образ из уже собранного бинаря (см. docs/adr docker-deploy).
image: build
docker build -t jellybit:dev .
clean:
rm -f $(BINARY)