material_manage_system/entrypoint-deploy.sh
copper-xw 9c78dcb6db feat: 支持前端 go:embed 单容器部署
新增部署专用 Dockerfile.deploy / docker-compose.deploy.yml 与本机构建脚本:
前端 dist 经 go:embed 编入 Go 二进制,alpine 运行时只打包不编译,
旧 Dockerfile 与双容器编排保持不变。
2026-10-10 16:14:49 +08:00

21 lines
524 B
Bash
Executable File
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.

#!/bin/sh
set -e
# 等待公共 MySQL(services-net 内容器名 mysql)。
# alpine busybox 自带 nc,无需额外安装客户端。
echo "Waiting for MySQL (mysql:3306)..."
i=0
until nc -z mysql 3306 2>/dev/null; do
i=$((i+1))
if [ "$i" -ge 60 ]; then
echo "MySQL not reachable after ~120s, exiting." >&2
exit 1
fi
sleep 2
done
echo "MySQL is reachable."
# Schema 首次由人工灌入 wms_default;应用启动时自动 seed 默认 admin。
echo "Starting application..."
exec "$@"