Files
iotlcm/Makefile
T
Dai0814 9f15ff6f9e
mirror-to-gitee / mirror (push) Successful in 58s
revert: 撤掉单仓内的门户骨架,门户以独立仓 iotlcm-public/website 为唯一来源
原因
门户已拆分为独立仓 iotlcm-public/website(11:28 建仓,13:13 完成
fafc743「并入旧骨架独有价值内容,修 favicon 落地路径与过渡形态绑定」),
是门户的唯一事实来源。本仓 6c8314a 合并进来的 website/ 是拆分前的
旧骨架,继续保留会导致:
- 两份门户代码持续漂移,同一问题要在两个仓各修一遍
- 单仓 compose / gateway / Makefile 里残留 with-website profile 与
  /www/ 路由,与独立仓「门户自起容器、独立端口」的既定方案冲突

本提交 = revert -m 1 6c8314a,效果等同回到 e98f856
(git diff e98f856 HEAD 为空)。回退点:
tag backup/before-revert-portal-20261104 -> 6c8314a

门户部署改为(164 上,独立目录,不动 iotlcm-deploy):
  git clone https://git.5iot.com/iotlcm-public/website.git ~/iotlcm/website
  cd ~/iotlcm/website
  PORTAL_BIND_ADDR=0.0.0.0 docker compose -f deploy/docker-compose.yml up -d --build
2026-11-04 13:17:36 +08:00

73 lines
2.7 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# iotLCM 开源版 —— 常用构建入口
#
# make build 编译全部 Go 服务
# make test 跑全部 Go 模块的单元测试
# make images 本地构建全部镜像(默认 tag 用 git describe)
# make docs 本地构建文档站
# make clean 清理构建产物
#
# 镜像仓库与版本可覆盖:
# make images REGISTRY=registry.example.com/iotlcm/iotlcm VERSION=v1.0.4
REGISTRY ?= iotlcm
VERSION ?= $(shell git describe --tags --abbrev=0 2>/dev/null || git rev-parse --short HEAD)
BASE_REGISTRY ?= docker.io/library
GO_MODULES := admin-svr/server app/server bot onelink-mock openapi sms upstream-chan upstream-proxy worker-svr
# 目录|镜像名|构建上下文|Dockerfile|固定版本(留空=跟随 VERSION)
# 小程序线 app 固定 v1.0.2:版本号与功能一一对应,平台发新 tag 时不跟着动。
IMAGE_MAP := \
admin-svr|iotlcm-admin-svr|admin-svr/server|build/Dockerfile| \
admin-ui|iotlcm-admin-ui|admin-ui|vue/build/Dockerfile| \
openapi|iotlcm-openapi|openapi|build/Dockerfile| \
worker-svr|iotlcm-worker-svr|worker-svr|build/Dockerfile| \
upstream-chan|iotlcm-upstream-chan|upstream-chan|build/Dockerfile| \
upstream-proxy|iotlcm-upstream-proxy|upstream-proxy|build/Dockerfile| \
app|iotlcm-app-server|app/server|Dockerfile|v1.0.2 \
app|iotlcm-app-web|app/app|Dockerfile|v1.0.2 \
sms|iotlcm-sms|sms|build/Dockerfile| \
bot|iotlcm-bot|bot|Dockerfile| \
docs|iotlcm-docs|docs|Dockerfile| \
onelink-mock|iotlcm-onelink-mock|onelink-mock|Dockerfile|
.PHONY: help build test images docs clean
help:
@grep -E '^# make' Makefile | sed 's/^# //'
build:
@set -e; for m in $(GO_MODULES); do \
echo "==> go build ./... ($$m)"; \
( cd "$$m" && go build ./... ); \
done
@echo "✅ 全部 Go 服务编译通过"
test:
@set -e; for m in $(GO_MODULES); do \
echo "==> go test ./... ($$m)"; \
( cd "$$m" && go test ./... ); \
done
images:
@set -e; echo "镜像前缀: $(REGISTRY) 版本: $(VERSION)"; \
echo "$(IMAGE_MAP)" | tr ' ' '\n' | while IFS='|' read -r dir img ctx df pin; do \
[ -z "$$dir" ] && continue; \
v="$${pin:-$(VERSION)}"; \
echo ""; echo "==> $$img:$$v (context=$$ctx dockerfile=$$df$${pin:+ [固定版本]})"; \
docker build -f "$$ctx/$$df" \
--build-arg BASE_REGISTRY="$(BASE_REGISTRY)" \
--build-arg BuildVersion="$$v" \
--build-arg CommitID="$$(git rev-parse --short=7 HEAD)" \
--build-arg BuildTime="$$(date -u +%FT%TZ)" \
-t "$(REGISTRY):$$img-$$v" "$$ctx"; \
done
docs:
cd docs && npm ci && npm run build
@echo "✅ 文档站产物:docs/.vitepress/dist"
clean:
@rm -rf docs/.vitepress/dist docs/.vitepress/cache
@echo "✅ 已清理"