Backend: - New /api/server/health endpoint returning server, paths, disk, mods, steamcmd, and frontend status - Health endpoint checks directory existence/writability, disk usage, server binary, and frontend dist availability Frontend: - New Status page (route /status) with sections for Server, SteamCMD, Mods, Frontend, Directories (with exists/writable badges), and Disk Usage (with size formatting and used-percent coloring) - Paths are clickable to copy and use start-truncation (ellipsis on the left) with native hover tooltip - Health API client integration with 10s auto-refresh Misc: - Update .gitignore and Makefile, minor Layout nav addition
30 lines
1.0 KiB
Makefile
30 lines
1.0 KiB
Makefile
.PHONY: backend frontend build run clean dev
|
|
|
|
DEV_DEPLOY_DIR ?= ../dev-deploy
|
|
|
|
# Default paths — override via env or copy .env.example
|
|
SERVERFILE_DIR ?= $(DEV_DEPLOY_DIR)/serverfiles
|
|
MODS_DIR ?= $(DEV_DEPLOY_DIR)/serverfiles/mods
|
|
CFG_DIR ?= $(DEV_DEPLOY_DIR)/serverfiles/cfg
|
|
PROFILES_DIR ?= $(DEV_DEPLOY_DIR)/serverfiles/profiles
|
|
DATA_DIR ?= $(DEV_DEPLOY_DIR)/data
|
|
|
|
backend:
|
|
cd backend && go build -o arma3-web-server ./cmd/server/
|
|
|
|
frontend:
|
|
cd frontend && npm run build
|
|
|
|
build: backend frontend
|
|
|
|
run:
|
|
cd backend && DEV_DEPLOY_DIR=$(DEV_DEPLOY_DIR) SERVERFILE_DIR=$(SERVERFILE_DIR) MODS_DIR=$(MODS_DIR) CFG_DIR=$(CFG_DIR) PROFILES_DIR=$(PROFILES_DIR) DATA_DIR=$(DATA_DIR) GIN_MODE=debug go run ./cmd/server/
|
|
|
|
dev:
|
|
cd backend && DEV_DEPLOY_DIR=$(DEV_DEPLOY_DIR) SERVERFILE_DIR=$(SERVERFILE_DIR) MODS_DIR=$(MODS_DIR) CFG_DIR=$(CFG_DIR) PROFILES_DIR=$(PROFILES_DIR) DATA_DIR=$(DATA_DIR) GIN_MODE=debug go run ./cmd/server/ &
|
|
cd frontend && npm run dev
|
|
|
|
clean:
|
|
rm -f backend/arma3-web-server
|
|
rm -rf frontend/dist
|