Files
gomoku/server/Makefile
T
tiennm99 1b9eec5f7d refactor: rename Go module and copy core pkgs into server/pkg
- Module: github.com/ratel-online/server → github.com/tiennm99/gomoku/server
- Copied core/{log,util/async,util/json,util/strings,model,network,protocol,consts}
  into server/pkg/* (temporary shims until phase-05 replaces protocol/network)
- Rewrote all ratel-online import paths across server/**/*.go
- Trimmed main.go: single -p flag, WS-only on :1999, no TCP/bot/static
- Trimmed network/wss.go: endpoint /gomoku, no static file serving
- Updated Makefile: removed TCP/bot references, port 1999
2026-04-11 12:04:03 +07:00

45 lines
1.1 KiB
Makefile

.PHONY: help build run stop logs shell clean test
# Detect Docker Compose command
DOCKER_COMPOSE := $(shell which docker-compose 2>/dev/null)
ifeq ($(DOCKER_COMPOSE),)
DOCKER_COMPOSE := $(shell docker compose version >/dev/null 2>&1 && echo "docker compose" || echo "")
endif
ifeq ($(DOCKER_COMPOSE),)
$(error "Docker Compose not installed. Install docker-compose or upgrade Docker.")
endif
help:
@echo "Gomoku server Docker management"
@echo ""
@echo " make build - Build Docker image"
@echo " make run - Start server (dev)"
@echo " make stop - Stop server"
@echo " make logs - View logs"
@echo " make shell - Open container shell"
@echo " make clean - Remove containers and images"
@echo " make test - Run Go tests"
build:
$(DOCKER_COMPOSE) build
run:
$(DOCKER_COMPOSE) up -d
@echo "Server started: ws://localhost:1999/gomoku"
stop:
$(DOCKER_COMPOSE) down
logs:
$(DOCKER_COMPOSE) logs -f
shell:
$(DOCKER_COMPOSE) exec gomoku-server sh
clean:
$(DOCKER_COMPOSE) down -v
docker rmi gomoku-server:latest || true
test:
go test ./...