更新:显示版本号

This commit is contained in:
yyhuni
2025-12-21 09:05:25 +08:00
parent 54017d0334
commit 69a598e789
2 changed files with 6 additions and 0 deletions

View File

@@ -27,7 +27,9 @@ COPY frontend/ ./
# 设置环境变量(构建时使用)
ARG NEXT_PUBLIC_API_URL
ARG IMAGE_TAG=unknown
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
ENV NEXT_PUBLIC_VERSION=${IMAGE_TAG}
# Docker 内部网络使用服务名 server 作为后端地址
ENV API_HOST=server

View File

@@ -126,6 +126,10 @@ export default function LoginPage() {
</div>
</CardContent>
</Card>
{/* 版本号 */}
<p className="text-center text-xs text-muted-foreground mt-4">
{process.env.NEXT_PUBLIC_VERSION || 'dev'}
</p>
</div>
</div>
</div>