chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)
This commit is contained in:
commit
9097ee699d
5769 files changed
+1446466
No files matched your search
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=WeKnora first-boot initialization (runs once)
|
||||
After=docker.service network-online.target
|
||||
Requires=docker.service
|
||||
Wants=network-online.target
|
||||
Before=weknora.service
|
||||
ConditionPathExists=/usr/local/sbin/weknora-firstboot.sh
|
||||
ConditionPathExists=!/opt/WeKnora/.firstboot.done
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/sbin/weknora-firstboot.sh
|
||||
RemainAfterExit=no
|
||||
TimeoutStartSec=900
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=WeKnora (docker compose)
|
||||
Requires=docker.service weknora-firstboot.service
|
||||
After=docker.service network-online.target weknora-firstboot.service
|
||||
Wants=network-online.target
|
||||
# 关键: Requires=weknora-firstboot.service 让首启 init 失败时本服务也不启动,
|
||||
# 避免 firstboot 没成功生成随机密钥就用 .env.example 默认明文密码把 postgres
|
||||
# 数据卷初始化掉。weknora-firstboot.service 在已初始化的实例上由
|
||||
# ConditionPathExists=!/opt/WeKnora/.firstboot.done 跳过, 跳过 = 成功,
|
||||
# 不会阻塞本服务后续重启。
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/opt/WeKnora
|
||||
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