mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 10:42:57 +00:00
upload
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
.PHONY: build run test migrate seed clean help
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@echo " build - Build the application"
|
||||
@echo " run - Run the application locally"
|
||||
@echo " docker-up - Start the application with Docker"
|
||||
@echo " docker-down - Stop the Docker containers"
|
||||
@echo " test - Run tests"
|
||||
@echo " migrate - Run database migrations"
|
||||
@echo " seed - Seed the database with test data"
|
||||
@echo " clean - Clean build artifacts"
|
||||
|
||||
# Build the application
|
||||
build:
|
||||
go build -o bin/fotbal-club
|
||||
|
||||
# Run the application locally
|
||||
run:
|
||||
go run main.go
|
||||
|
||||
# Start the application with Docker
|
||||
docker-up:
|
||||
docker-compose up -d --build
|
||||
|
||||
# Stop the Docker containers
|
||||
docker-down:
|
||||
docker-compose down
|
||||
|
||||
# Run tests
|
||||
test:
|
||||
go test -v ./...
|
||||
|
||||
# Run database migrations
|
||||
migrate:
|
||||
go run main.go migrate
|
||||
|
||||
# Seed the database with test data
|
||||
seed:
|
||||
go run main.go seed
|
||||
|
||||
# Clean build artifacts
|
||||
clean:
|
||||
go clean
|
||||
rm -rf bin/
|
||||
|
||||
# Install dependencies
|
||||
deps:
|
||||
go mod download
|
||||
go mod verify
|
||||
|
||||
# Format code
|
||||
fmt:
|
||||
go fmt ./...
|
||||
|
||||
# Lint code
|
||||
lint:
|
||||
golangci-lint run
|
||||
|
||||
# Run the application in development mode
|
||||
dev:
|
||||
docker-compose -f docker-compose.yml up --build
|
||||
Reference in New Issue
Block a user