harbor 随着系统重启动自动拉起的时候状态会异常,部分服务状态为 exited=128 的现象,可以通过创建一个守护服务来解决,具体如下:
[Unit]
Description=Harbor
After=docker.service systemd-networkd.service systemd-resolved.service
Requires=docker.service
Documentation=http://github.com/vmware/harbor
[Service]
Type=simple
Restart=on-failure
RestartSec=5
ExecStart=/usr/local/bin/docker-compose -f /data/harbor/docker-compose.yml up
ExecStop=/usr/local/bin/docker-compose -f /data/harbor/docker-compose.yml down
[Install]
WantedBy=multi-user.target