mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-09-01 14:53:07 +08:00
0cfbad7f97
- Updated cleanup.sh to avoid recreating .env during cleanup, preventing exposure of default passwords before firstboot. - Modified firstboot.sh to create .env from .env.example only if it doesn't exist, ensuring no sensitive data is present before initialization. - Added support for Docker Hub and GitHub tarball download acceleration via new environment variables WEKNORA_GH_PROXY and DOCKER_REGISTRY_MIRROR. - Implemented a mechanism to prune old WeKnora images based on the current version, reducing image size and maintaining a clean environment. - Enhanced README.md with instructions for using the new acceleration features and image pruning options.
22 lines
783 B
Desktop File
22 lines
783 B
Desktop File
[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
|