12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- include config/.env
- GOOSE_DB_STRING = ${DB_USER}:${DB_PASSWORD}@/${DB_NAME}?parseTime=true
- usage:
- @echo "make run"
- @echo "make app-build"
- @echo "make lint"
- @echo "make test"
- @echo "make test-cover"
- @echo "make docker-build"
- @echo "make docker-up"
- @echo "make docker-down"
- @echo "make migration-status"
- @echo "make migration-up"
- run:
- cd cmd/app && go run main.go
- app-build:
- env GOOS=linux GOARCH=amd64 go build -o build/app/app cmd/app/main.go
- lint:
- golangci-lint run --timeout=3m
- test:
- go test ./...
- test-cover:
- go test ./... -coverprofile=build/coverage.out
- go tool cover -html=build/coverage.out
- docker-build:
- docker compose --file build/docker/docker-compose.yml --env-file config/.env --project-name dmitriygnatenko up --build --detach
- docker-up:
- docker compose --file build/docker/docker-compose.yml --env-file config/.env --project-name dmitriygnatenko up --detach
- docker-down:
- docker compose --file build/docker/docker-compose.yml --env-file config/.env --project-name dmitriygnatenko down
- migration-status:
- goose -dir migrations mysql ${GOOSE_DB_STRING} status
- migration-up:
- goose -dir migrations mysql ${GOOSE_DB_STRING} up
|