chore: 初始化仓库,导入项目基线代码
Academy v0.8.3 完整代码基线:Go 后端(internal/cmd/cli/mcp-server/docreader)、 Vue 前端(frontend)、数据库迁移(migrations)、部署编排(docker/helm/deploy)与文档。 今日开发的培训推送管理改动随后单独提交。
This commit is contained in:
commit
7ec21f35b0
5767 files changed
+1436788
No files matched your search
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Academy first-boot initialization (runs once)
|
||||
After=docker.service network-online.target
|
||||
Requires=docker.service
|
||||
Wants=network-online.target
|
||||
Before=academy.service
|
||||
ConditionPathExists=/usr/local/sbin/academy-firstboot.sh
|
||||
ConditionPathExists=!/opt/Academy/.firstboot.done
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/sbin/academy-firstboot.sh
|
||||
RemainAfterExit=no
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Academy (docker compose)
|
||||
Requires=docker.service academy-firstboot.service
|
||||
After=docker.service network-online.target academy-firstboot.service
|
||||
Wants=network-online.target
|
||||
# 关键: Requires=academy-firstboot.service 让首启 init 失败时本服务也不启动,
|
||||
# 避免 firstboot 没成功生成随机密钥就用 .env.example 默认明文密码把 postgres
|
||||
# 数据卷初始化掉。academy-firstboot.service 在已初始化的实例上由
|
||||
# ConditionPathExists=!/opt/Academy/.firstboot.done 跳过, 跳过 = 成功,
|
||||
# 不会阻塞本服务后续重启。
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/opt/Academy
|
||||
ExecStart=@DOCKER_BIN@ compose up -d
|
||||
ExecStop=@DOCKER_BIN@ compose down
|
||||
TimeoutStartSec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user