Added systemd service file example
This commit is contained in:
parent
2203c64d0f
commit
aebc2db61e
17
examples/eo-services.service
Normal file
17
examples/eo-services.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=eo-services
|
||||||
|
Requires=docker.service
|
||||||
|
After=docker.service
|
||||||
|
[Service]
|
||||||
|
Restart=always
|
||||||
|
User=root
|
||||||
|
Group=docker
|
||||||
|
WorkingDirectory=/opt/em/projects/current/demo/eo-services
|
||||||
|
# Shutdown container (if running) when unit is started
|
||||||
|
ExecStartPre=/usr/bin/docker compose down
|
||||||
|
# Start container when unit is started
|
||||||
|
ExecStart=/usr/bin/docker compose up
|
||||||
|
# Stop container when unit is stopped
|
||||||
|
ExecStop=/usr/bin/docker compose down
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Loading…
x
Reference in New Issue
Block a user