mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-21 17:55:30 +01:00
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>
This commit is contained in:
parent
c9a61d37e3
commit
4faab2618e
16
tools/systemd/harbor.service
Normal file
16
tools/systemd/harbor.service
Normal file
@ -0,0 +1,16 @@
|
||||
[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
|
Loading…
Reference in New Issue
Block a user