.PHONY: test build clean lint dev run-docker docs-upd docker docker-run


test:
	go test -cover ./...


build:
	go build -o bin/d3m0k1d.ru backend/main.go


clean:
	rm -f bin/d3m0k1d.ru


lint:
	golangci-lint run --fix

dev:
	swag init -g ./cmd/main.go --parseDependency --parseInternal
	go run ./cmd/main.go


docs-upd:
	swag init -g ./cmd/main.go --parseDependency --parseInternal


docker:
	swag init -g ./cmd/main.go --parseDependency --parseInternal
	docker build -t backend .

docker-run:
	docker run --rm -p 8080:8080 --env-file .env -v /opt/d3m0k1d.ru/data:/data backend:latest

run-docker:
	docker build -t backend .
	docker run --rm -p 8080:8080 --env-file .env backend:latest
