Files
glkvm-cloud/Makefile
T
GL.iNet-Yongping.Xie b089169270 doc: update docker-compose YAML file
1. Official image has been pushed to Docker Hub.
2. Updated the docker-compose YAML file to reference the official image.

Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
2025-09-15 19:17:00 -07:00

45 lines
826 B
Makefile

# Makefile
# Go binary name
BINARY_NAME = rttys
# Go build flags
BUILD_FLAGS := -ldflags "-s -w"
# Go build command
GO_BUILD_CMD = go build $(BUILD_FLAGS) -o $(BINARY_NAME)
# Paths
UI_DIR = ui
CONF_FILE = ./rttys.conf
.PHONY: all ui build run build-run full-run
# Build frontend files only
ui:
cd $(UI_DIR) && npm install && npm run build
# Build Go binary only
build:
CGO_ENABLED=0 $(GO_BUILD_CMD)
# Run Go program only
run:
./$(BINARY_NAME) -c $(CONF_FILE)
# Build frontend and Go binary
build-all: ui build
# Build Go binary and run
build-run: build run
# Build frontend, build Go binary, and run
full-run: ui build run
# Build Docker image without updating ui
docker-build: build
docker build -t glkvm-cloud:build .
# Full Build Docker image
docker-fullbuild: ui build
docker build -t glkvm-cloud:build .