Added Docker container and compose definitions to make development easier
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine
2026-07-24 11:00:35 -04:00
parent 6ac189a72c
commit 58dd358acb
5 changed files with 75 additions and 38 deletions
+16 -37
View File
@@ -1,45 +1,24 @@
NAME=blt
VERSION=`git describe --tags`
.PHONY: build
## build: Compile the packages.
# used for changing the output directory within docker containers
BUILD_DIR ?= .
dev-up:
docker compose -f docker-dev.yml up -d
dev-down:
docker compose -f docker-dev.yml down
dev-build:
docker compose -f docker-dev.yml build
build:
@go build -o $(NAME) -ldflags "-X git.metaunix.net/bitgoblin/blt/app.AppVersion=$(VERSION)"
@echo "Building Go binary..."
@go build -o $(BUILD_DIR)/$(NAME) -ldflags "-X git.metaunix.net/bitgoblin/blt/app.AppVersion=$(VERSION)"
.PHONY: grunt
## grunt: Compile frontend assets.
grunt:
@npm run grunt
.PHONY: grunt-watch
## grunt-watch: Compile frontend assets while watching for changes.
grunt-watch:
@npm run grunt watch
.PHONY: run
## run: Build and Run in development mode.
run: build
@./$(NAME) -e development
.PHONY: run-prod
## run-prod: Build and Run in production mode.
run-prod: build
@./$(NAME) -e production
.PHONY: clean
## clean: Clean project and previous builds.
clean:
@rm -f $(NAME)
.PHONY: deps
## deps: Download modules
deps:
@go mod download
.PHONY: test
## test: Run tests with verbose mode
test:
@go test -v ./tests/*
run:
$(BUILD_DIR)/$(NAME)
.PHONY: help
all: help