harbor/tools/systemd/harbor.service
Wang Yan 4faab2618e
add an example of harbor systemd service (#17420)
Dependencies
1, You must have docker with compose plugin installed.
2, You must have the directory /etc/goharbor/harbor in your env.

Tested
1, ubuntu 20.04

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-08-17 16:53:13 +08:00

16 lines
442 B
Desktop File

[Unit]
Description=Harbor Cloud Native Registry
Documentation=https://goharbor.io
After=docker.service
Requires=docker.service
[Service]
Type=simple
Restart=on-failure
RestartSec=5
ExecStart=docker compose -f /etc/goharbor/harbor/docker-compose.yml up
ExecStop=docker compose -f /etc/goharbor/harbor/docker-compose.yml down -v
ExecStopPost=docker compose -f /etc/goharbor/harbor/docker-compose.yml rm -f
[Install]
WantedBy=multi-user.target